{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "import requests\n",
    "import pandas as pd\n",
    "crisp_key = \"d3db9101f93fc24ecd64266e51e08f39\"\n",
    "from geo import *"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 地理编码与逆地理编码\n",
    "\n",
    "- 地理编码/逆地理编码 API 是通过 HTTP/HTTPS 协议访问远程服务的接口，提供结构化地址与经纬度之间的相互转化的能力。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 地理编码\n",
    "\n",
    "1. 地理编码，将详细的结构化地址转换为高德经纬度坐标\n",
    "\n",
    " - URL:https://restapi.amap.com/v3/geocode/geo?parameters\n",
    " - 请求参数：key,address(结构化地址信息，规则遵循：国家、省份、城市、区县、城镇、乡村、街道、门牌号码、屋邨、大厦)\n",
    " - 请求方式：requests.get()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'113.679287,23.632575'"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 调用地理编码\n",
    "NFU_geo = geocode(crisp_key,\"广东省广州市从化区中山大学南方学院\")\n",
    "NFU_geo"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 逆地理编码\n",
    "\n",
    "1. 逆地理编码：将经纬度转换为详细结构化的地址，且返回附近周边的POI、AOI信息。\n",
    "\n",
    "  - URL：https://restapi.amap.com/v3/geocode/regeo?parameters\n",
    "  - 请求参数：key,location(经纬度坐标,经度在前，纬度在后，经纬度间以“,”分割)\n",
    "  - 请求方式：requests.get()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'广东省广州市从化区温泉镇中山大学南方学院'"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 调用逆地理编码\n",
    "NFU_regeo = regeo(crisp_key,\"113.679287,23.632575\")\n",
    "NFU_regeo"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 路径规划\n",
    "1. 路径规划API是一套以HTTP形式提供的步行、公交、驾车查询及行驶距离计算接口，返回JSON 或 XML格式的查询数据，用于实现路径规划功能的开发。 \n",
    "2. 适用场景:无需展现地图的场景下，进行线路查询，如以线路结果页形式展现换乘方案；根据返回线路数据，自行开发线路导航。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 步行路径规划\n",
    "1. 步行路径规划API可以规划100KM以内的步行通勤方案，并且返回通勤方案的数据。\n",
    "\n",
    "  - URL:https://restapi.amap.com/v3/direction/walking?parameters\n",
    "  - 请求参数：key,origin,destination(后两者使用经纬度)\n",
    "  - 请求方式：requests.get()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[{'instruction': '向北步行92米向左前方行走',\n",
       "  'orientation': '北',\n",
       "  'road': [],\n",
       "  'distance': '92',\n",
       "  'duration': '74',\n",
       "  'polyline': '113.679592,23.632856;113.679592,23.633173;113.679592,23.633173;113.679592,23.633251;113.679592,23.633251;113.679622,23.63365;113.679648,23.633689',\n",
       "  'action': '向左前方行走',\n",
       "  'assistant_action': [],\n",
       "  'walk_type': '0'},\n",
       " {'instruction': '沿博学路向西北步行197米左转',\n",
       "  'orientation': '西北',\n",
       "  'road': '博学路',\n",
       "  'distance': '197',\n",
       "  'duration': '158',\n",
       "  'polyline': '113.679648,23.633689;113.679553,23.633967;113.679553,23.633967;113.679375,23.634358;113.679375,23.634358;113.679253,23.634479;113.679253,23.634479;113.679058,23.634657;113.679058,23.634657;113.678932,23.634761;113.678711,23.634918;113.678711,23.634918;113.678637,23.63497;113.678598,23.63503;113.678559,23.635109',\n",
       "  'action': '左转',\n",
       "  'assistant_action': [],\n",
       "  'walk_type': '0'},\n",
       " {'instruction': '沿博学路向西步行163米右转',\n",
       "  'orientation': '西',\n",
       "  'road': '博学路',\n",
       "  'distance': '163',\n",
       "  'duration': '130',\n",
       "  'polyline': '113.678555,23.635109;113.67786,23.635091;113.677613,23.635035;113.677539,23.634996;113.677539,23.634996;113.677331,23.634857;113.677331,23.634857;113.677088,23.63467',\n",
       "  'action': '右转',\n",
       "  'assistant_action': [],\n",
       "  'walk_type': '0'},\n",
       " {'instruction': '沿博学路向西步行33米右转',\n",
       "  'orientation': '西',\n",
       "  'road': '博学路',\n",
       "  'distance': '33',\n",
       "  'duration': '26',\n",
       "  'polyline': '113.677083,23.634666;113.677027,23.634701;113.676918,23.634718;113.676853,23.634705;113.676797,23.634661',\n",
       "  'action': '右转',\n",
       "  'assistant_action': [],\n",
       "  'walk_type': '0'},\n",
       " {'instruction': '沿中山路向西北步行1265米右转',\n",
       "  'orientation': '西北',\n",
       "  'road': '中山路',\n",
       "  'distance': '1265',\n",
       "  'duration': '1012',\n",
       "  'polyline': '113.676793,23.634657;113.675273,23.636128;113.675156,23.636263;113.675026,23.636467;113.674974,23.636567;113.674961,23.636701;113.674961,23.636845;113.674991,23.636997;113.675382,23.637886;113.67543,23.638043;113.675521,23.638659;113.675525,23.638997;113.675508,23.639132;113.675508,23.639132;113.675456,23.63931;113.675334,23.639583;113.675113,23.640035;113.675004,23.640187;113.674319,23.641024;113.673364,23.64214;113.672982,23.642535;113.672174,23.643303;113.672174,23.643303;113.671428,23.644045',\n",
       "  'action': '右转',\n",
       "  'assistant_action': [],\n",
       "  'walk_type': '0'},\n",
       " {'instruction': '沿温泉大道向东北步行1420米直行',\n",
       "  'orientation': '东北',\n",
       "  'road': '温泉大道',\n",
       "  'distance': '1420',\n",
       "  'duration': '1136',\n",
       "  'polyline': '113.671424,23.644045;113.671636,23.644162;113.671636,23.644162;113.673103,23.64497;113.673103,23.64497;113.67395,23.645425;113.67395,23.645425;113.674366,23.645651;113.674366,23.645651;113.67546,23.646276;113.675968,23.646636;113.676411,23.647018;113.676411,23.647018;113.677444,23.647964;113.677444,23.647964;113.677496,23.648012;113.677496,23.648012;113.678581,23.648989;113.678581,23.648989;113.6799,23.650187;113.6799,23.650187;113.680295,23.650612;113.680295,23.650612;113.680747,23.651181;113.680747,23.651181;113.680946,23.651493;113.681159,23.651879;113.681341,23.652326;113.68145,23.652656',\n",
       "  'action': '直行',\n",
       "  'assistant_action': [],\n",
       "  'walk_type': '0'},\n",
       " {'instruction': '沿御泉大道向北步行3156米向左前方行走',\n",
       "  'orientation': '北',\n",
       "  'road': '御泉大道',\n",
       "  'distance': '3156',\n",
       "  'duration': '2525',\n",
       "  'polyline': '113.68145,23.652656;113.681493,23.652843;113.681493,23.652843;113.681576,23.653294;113.681606,23.653542;113.681615,23.654006;113.681606,23.654288;113.681476,23.655143;113.681398,23.655508;113.680955,23.657209;113.680955,23.657209;113.680664,23.65832;113.680664,23.65832;113.680286,23.65977;113.680286,23.65977;113.680078,23.660391;113.679826,23.660951;113.679657,23.661241;113.679657,23.661241;113.679453,23.661541;113.679314,23.661714;113.678971,23.662109;113.678971,23.662109;113.678668,23.662487;113.678668,23.662487;113.678398,23.662813;113.678398,23.662813;113.677904,23.663381;113.677904,23.663381;113.677409,23.663963;113.677409,23.663963;113.677248,23.664201;113.677157,23.664362;113.677088,23.664544;113.677088,23.664544;113.677027,23.664774;113.677005,23.665074;113.677023,23.665842;113.677014,23.666155;113.676949,23.666385;113.676897,23.666536;113.676706,23.666897;113.676432,23.667374;113.676432,23.667374;113.675425,23.669102;113.675425,23.669102;113.675247,23.669388;113.675247,23.669388;113.674874,23.670022;113.674579,23.670564;113.674358,23.67115;113.674301,23.671363;113.674271,23.671628;113.674266,23.67201;113.674297,23.672391;113.674375,23.672717;113.674497,23.67306;113.674605,23.673273;113.674748,23.673516;113.675039,23.673893;113.675343,23.674193;113.675595,23.674418;113.677105,23.675668;113.677105,23.675668;113.677426,23.675933;113.677426,23.675933;113.678898,23.677148;113.678898,23.677148;113.679479,23.677595',\n",
       "  'action': '向左前方行走',\n",
       "  'assistant_action': [],\n",
       "  'walk_type': '0'},\n",
       " {'instruction': '步行9米右转',\n",
       "  'orientation': [],\n",
       "  'road': [],\n",
       "  'distance': '9',\n",
       "  'duration': '7',\n",
       "  'polyline': '113.679479,23.677595;113.679431,23.677661',\n",
       "  'action': '右转',\n",
       "  'assistant_action': [],\n",
       "  'walk_type': '1'},\n",
       " {'instruction': '沿御泉大道向东北步行46米向左前方行走',\n",
       "  'orientation': '东北',\n",
       "  'road': '御泉大道',\n",
       "  'distance': '46',\n",
       "  'duration': '37',\n",
       "  'polyline': '113.679427,23.677661;113.679557,23.677752;113.679557,23.677752;113.679792,23.677899',\n",
       "  'action': '向左前方行走',\n",
       "  'assistant_action': [],\n",
       "  'walk_type': '0'},\n",
       " {'instruction': '沿御泉大道步行76米右转',\n",
       "  'orientation': [],\n",
       "  'road': '御泉大道',\n",
       "  'distance': '76',\n",
       "  'duration': '61',\n",
       "  'polyline': '113.679792,23.677899;113.680113,23.678333;113.680113,23.678333;113.680191,23.678485',\n",
       "  'action': '右转',\n",
       "  'assistant_action': [],\n",
       "  'walk_type': '0'},\n",
       " {'instruction': '步行18米右转',\n",
       "  'orientation': [],\n",
       "  'road': [],\n",
       "  'distance': '18',\n",
       "  'duration': '14',\n",
       "  'polyline': '113.680191,23.678485;113.680373,23.678494',\n",
       "  'action': '右转',\n",
       "  'assistant_action': [],\n",
       "  'walk_type': '1'},\n",
       " {'instruction': '沿御泉大道步行2162米向右前方行走',\n",
       "  'orientation': [],\n",
       "  'road': '御泉大道',\n",
       "  'distance': '2162',\n",
       "  'duration': '1730',\n",
       "  'polyline': '113.680373,23.678494;113.680425,23.678424;113.680464,23.678403;113.680464,23.678403;113.680625,23.678351;113.680755,23.678338;113.680755,23.678338;113.681402,23.678507;113.681936,23.678598;113.68237,23.678659;113.68237,23.678659;113.682639,23.678694;113.682639,23.678694;113.684753,23.678963;113.685095,23.678989;113.685421,23.678971;113.68576,23.678898;113.686042,23.678793;113.686263,23.678676;113.686879,23.67829;113.687148,23.678155;113.687465,23.678056;113.687847,23.678003;113.68822,23.678008;113.688411,23.678038;113.688663,23.678103;113.688854,23.678181;113.689063,23.678281;113.689236,23.678394;113.689384,23.678507;113.689384,23.678507;113.6899,23.679006;113.691246,23.680369;113.69174,23.680855;113.69174,23.680855;113.692418,23.68145;113.693112,23.68201;113.693112,23.68201;113.69454,23.683047;113.69454,23.683047;113.696189,23.684214;113.696189,23.684214;113.696758,23.684622;113.697348,23.684991;113.697721,23.685165;113.697951,23.685247;113.698325,23.685339',\n",
       "  'action': '向右前方行走',\n",
       "  'assistant_action': [],\n",
       "  'walk_type': '0'},\n",
       " {'instruction': '沿御泉大道向东北步行2824米左转',\n",
       "  'orientation': '东北',\n",
       "  'road': '御泉大道',\n",
       "  'distance': '2824',\n",
       "  'duration': '2259',\n",
       "  'polyline': '113.698325,23.685339;113.698746,23.685391;113.699132,23.685391;113.699592,23.685334;113.699939,23.685252;113.700299,23.685113;113.700573,23.684974;113.700825,23.684831;113.701389,23.684427;113.701389,23.684427;113.701858,23.684128;113.702083,23.684019;113.702244,23.683963;113.702582,23.683893;113.702847,23.683876;113.703047,23.68388;113.703047,23.68388;113.703429,23.683954;113.703429,23.683954;113.703481,23.683967;113.703481,23.683967;113.70372,23.684062;113.703863,23.684141;113.704093,23.684297;113.704314,23.684501;113.704536,23.684783;113.70464,23.684983;113.704787,23.685356;113.705334,23.687127;113.705382,23.687248;113.705516,23.68753;113.705655,23.687743;113.705894,23.688016;113.706189,23.688281;113.706402,23.688424;113.706402,23.688424;113.706775,23.688628;113.706775,23.688628;113.708121,23.689288;113.708121,23.689288;113.708668,23.689575;113.709249,23.689896;113.709523,23.690078;113.709835,23.690313;113.710226,23.690651;113.710226,23.690651;113.710456,23.690872;113.710668,23.691089;113.711141,23.691675;113.711615,23.692378;113.712409,23.693594;113.712409,23.693594;113.712522,23.693759;113.712522,23.693759;113.712995,23.694392;113.713307,23.694748;113.713711,23.695174;113.713711,23.695174;113.713911,23.69536;113.714431,23.695803;113.71549,23.696636;113.71549,23.696636;113.716801,23.697691;113.716801,23.697691;113.717526,23.698247;113.717999,23.698633',\n",
       "  'action': '左转',\n",
       "  'assistant_action': [],\n",
       "  'walk_type': '0'},\n",
       " {'instruction': '向西步行204米向左前方行走',\n",
       "  'orientation': '西',\n",
       "  'road': [],\n",
       "  'distance': '204',\n",
       "  'duration': '163',\n",
       "  'polyline': '113.717999,23.698633;113.717882,23.69878;113.717882,23.69878;113.717739,23.698924;113.717739,23.698924;113.717622,23.699028;113.717622,23.699028;113.717426,23.699158;113.717127,23.699258;113.717127,23.699258;113.716853,23.699258;113.716732,23.699236;113.716732,23.699236;113.71648,23.699136;113.716311,23.699019',\n",
       "  'action': '向左前方行走',\n",
       "  'assistant_action': [],\n",
       "  'walk_type': '0'},\n",
       " {'instruction': '向西南步行12米到达目的地',\n",
       "  'orientation': '西南',\n",
       "  'road': [],\n",
       "  'distance': '12',\n",
       "  'duration': '10',\n",
       "  'polyline': '113.716306,23.699015;113.716302,23.698954;113.716259,23.698928',\n",
       "  'action': [],\n",
       "  'assistant_action': '到达目的地',\n",
       "  'walk_type': '0'}]"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 调用步行路规划\n",
    "walk_plan = walk(crisp_key,\"113.679287,23.632575\",\"113.716229,23.698900\")\n",
    "walk_plan"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 公交路径规划\n",
    "1. 公交路径规划API可以规划综合各类公共（火车、公交、地铁）交通方式的通勤方案，并且返回通勤方案的数据。\n",
    "\n",
    "  - URL:https://restapi.amap.com/v3/direction/transit/integrated?parameters\n",
    "  - 请求参数：key,origin,destination(两者使用经纬度)，city\n",
    "  - 请求方式：requests.get()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000',\n",
       " 'count': '2',\n",
       " 'route': {'origin': '113.679287,23.632575',\n",
       "  'destination': '113.716229,23.698900',\n",
       "  'distance': '10193',\n",
       "  'taxi_cost': '33',\n",
       "  'transits': [{'cost': '2.0',\n",
       "    'duration': '3156',\n",
       "    'nightflag': '0',\n",
       "    'walking_distance': '2053',\n",
       "    'distance': '11961',\n",
       "    'missed': '1',\n",
       "    'segments': [{'taxi': [],\n",
       "      'walking': {'origin': '113.679588,23.632856',\n",
       "       'destination': '113.671478,23.644075',\n",
       "       'distance': '1756',\n",
       "       'duration': '1505',\n",
       "       'steps': [{'instruction': '步行92米向左前方行走',\n",
       "         'road': [],\n",
       "         'distance': '92',\n",
       "         'duration': [],\n",
       "         'polyline': '113.679588,23.632856;113.679588,23.633173;113.679588,23.633251;113.679619,23.633650;113.679649,23.633690',\n",
       "         'action': '向左前方行走',\n",
       "         'assistant_action': []},\n",
       "        {'instruction': '沿博学路步行197米左转',\n",
       "         'road': '博学路',\n",
       "         'distance': '197',\n",
       "         'duration': [],\n",
       "         'polyline': '113.679649,23.633690;113.679550,23.633966;113.679375,23.634357;113.679253,23.634480;113.679062,23.634657;113.678932,23.634762;113.678711,23.634918;113.678635,23.634970;113.678596,23.635031;113.678558,23.635109',\n",
       "         'action': '左转',\n",
       "         'assistant_action': []},\n",
       "        {'instruction': '沿博学路步行163米右转',\n",
       "         'road': '博学路',\n",
       "         'distance': '163',\n",
       "         'duration': [],\n",
       "         'polyline': '113.678558,23.635109;113.677856,23.635092;113.677612,23.635035;113.677536,23.634996;113.677330,23.634857;113.677086,23.634670',\n",
       "         'action': '右转',\n",
       "         'assistant_action': []},\n",
       "        {'instruction': '沿博学路步行33米右转',\n",
       "         'road': '博学路',\n",
       "         'distance': '33',\n",
       "         'duration': [],\n",
       "         'polyline': '113.677086,23.634666;113.677025,23.634701;113.676918,23.634718;113.676857,23.634705;113.676796,23.634661',\n",
       "         'action': '右转',\n",
       "         'assistant_action': []},\n",
       "        {'instruction': '沿中山路步行1265米右转',\n",
       "         'road': '中山路',\n",
       "         'distance': '1265',\n",
       "         'duration': [],\n",
       "         'polyline': '113.676796,23.634657;113.675270,23.636129;113.675156,23.636263;113.675026,23.636467;113.674973,23.636566;113.674957,23.636702;113.674957,23.636845;113.674988,23.636997;113.675385,23.637886;113.675430,23.638042;113.675522,23.638659;113.675522,23.638998;113.675507,23.639132;113.675453,23.639311;113.675331,23.639584;113.675110,23.640036;113.675003,23.640186;113.674316,23.641024;113.673363,23.642139;113.672981,23.642534;113.672173,23.643303;113.671425,23.644045',\n",
       "         'action': '右转',\n",
       "         'assistant_action': []},\n",
       "        {'instruction': '沿温泉大道步行6米到达卫东',\n",
       "         'road': '温泉大道',\n",
       "         'distance': '6',\n",
       "         'duration': [],\n",
       "         'polyline': '113.671425,23.644045;113.671478,23.644075',\n",
       "         'action': [],\n",
       "         'assistant_action': '到达卫东'}]},\n",
       "      'bus': {'buslines': [{'departure_stop': {'name': '卫东',\n",
       "          'id': '900000069693007',\n",
       "          'location': '113.671509,23.644089'},\n",
       "         'arrival_stop': {'name': '良明',\n",
       "          'id': '900000069693026',\n",
       "          'location': '113.718513,23.698997'},\n",
       "         'name': '从11路(从化汽车站总站--良口客运站总站)',\n",
       "         'id': '900000069693',\n",
       "         'type': '普通公交线路',\n",
       "         'distance': '9908',\n",
       "         'duration': '1397',\n",
       "         'polyline': '113.671509,23.644089;113.673424,23.645147;113.674164,23.645538;113.674759,23.645876;113.675461,23.646276;113.675972,23.646641;113.676201,23.646828;113.676392,23.647001;113.677032,23.647587;113.677338,23.647856;113.677444,23.647961;113.677605,23.648108;113.679214,23.649567;113.679893,23.650187;113.680305,23.650612;113.680539,23.650903;113.680752,23.651187;113.680936,23.651476;113.681114,23.651801;113.681206,23.651995;113.681343,23.652327;113.681465,23.652742;113.681498,23.652866;113.681574,23.653284;113.681601,23.653521;113.681608,23.653597;113.681618,23.654007;113.681604,23.654227;113.681583,23.654376;113.681465,23.655142;113.681396,23.655506;113.681236,23.656142;113.680954,23.657209;113.680664,23.658319;113.680481,23.659002;113.680482,23.659002;113.680330,23.659575;113.680187,23.660074;113.680074,23.660391;113.679939,23.660707;113.679822,23.660951;113.679653,23.661237;113.679453,23.661541;113.679145,23.661910;113.678911,23.662170;113.678663,23.662487;113.677899,23.663381;113.677400,23.663963;113.677240,23.664201;113.677157,23.664362;113.677083,23.664549;113.677027,23.664774;113.677001,23.665074;113.677027,23.665621;113.677023,23.666007;113.677005,23.666155;113.676944,23.666385;113.676892,23.666541;113.676788,23.666745;113.676432,23.667374;113.675417,23.669102;113.675247,23.669388;113.674870,23.670022;113.674575,23.670564;113.674510,23.670716;113.674349,23.671150;113.674301,23.671363;113.674271,23.671628;113.674258,23.672010;113.674297,23.672391;113.674375,23.672717;113.674492,23.673060;113.674601,23.673273;113.674748,23.673520;113.675043,23.673893;113.675343,23.674193;113.675599,23.674418;113.676944,23.675534;113.677431,23.675933;113.678898,23.677148;113.679240,23.677422;113.679236,23.677422;113.679297,23.677465;113.679531,23.677635;113.679857,23.677843;113.680278,23.678056;113.680486,23.678147;113.680773,23.678255;113.681012,23.678328;113.681233,23.678382;113.681688,23.678477;113.682691,23.678615;113.683682,23.678764;113.684173,23.678822;113.684785,23.678884;113.685099,23.678907;113.685395,23.678889;113.685664,23.678832;113.685852,23.678773;113.686039,23.678698;113.686242,23.678587;113.686523,23.678398;113.686827,23.678207;113.687105,23.678073;113.687292,23.678003;113.687496,23.677956;113.687700,23.677921;113.687969,23.677908;113.688173,23.677917;113.688516,23.677977;113.688689,23.678025;113.688928,23.678121;113.689106,23.678207;113.689288,23.678325;113.689457,23.678455;113.689899,23.678886;113.691554,23.680560;113.692361,23.681289;113.693247,23.682014;113.693938,23.682520;113.694909,23.683199;113.694908,23.683201;113.694908,23.683203;113.696236,23.684141;113.696724,23.684496;113.697083,23.684734;113.697273,23.684856;113.697441,23.684948;113.697792,23.685104;113.697968,23.685165;113.698280,23.685244;113.698441,23.685274;113.698593,23.685291;113.698853,23.685308;113.699112,23.685305;113.699341,23.685286;113.699493,23.685265;113.699615,23.685244;113.699890,23.685169;113.700104,23.685095;113.700264,23.685034;113.700539,23.684891;113.700768,23.684757;113.701035,23.684574;113.701347,23.684349;113.701721,23.684101;113.701965,23.683985;113.702202,23.683884;113.702324,23.683849;113.702583,23.683802;113.702705,23.683794;113.702927,23.683788;113.703056,23.683798;113.703194,23.683811;113.703438,23.683867;113.703644,23.683937;113.703697,23.683954;113.703842,23.684029;113.704079,23.684172;113.704285,23.684328;113.704391,23.684435;113.704529,23.684614;113.704720,23.684938;113.704811,23.685160;113.704865,23.685316;113.705307,23.686749;113.705482,23.687279;113.705566,23.687431;113.705681,23.687609;113.705750,23.687725;113.705833,23.687843;113.705940,23.687946;113.706093,23.688095;113.706337,23.688286;113.706451,23.688351;113.706566,23.688425;113.706802,23.688551;113.707863,23.689072;113.708473,23.689375;113.708496,23.689388;113.708878,23.689577;113.709305,23.689837;113.709648,23.690073;113.710091,23.690413;113.710518,23.690811;113.710846,23.691164;113.711357,23.691849;113.712326,23.693298;113.712502,23.693552;113.712830,23.694040;113.712975,23.694235;113.713211,23.694504;113.713242,23.694544;113.713722,23.695061;113.713821,23.695156;113.714386,23.695652;113.715523,23.696554;113.715584,23.696608;113.715973,23.696918;113.716042,23.696976;113.716721,23.697510;113.718063,23.698568;113.718330,23.698811;113.718513,23.698997',\n",
       "         'bustimetag': '2',\n",
       "         'start_time': '0630',\n",
       "         'end_time': '1930',\n",
       "         'via_num': '8',\n",
       "         'via_stops': [{'name': '三层路口',\n",
       "           'id': '900000069693019',\n",
       "           'location': '113.677605,23.648108'},\n",
       "          {'name': '桥栏',\n",
       "           'id': '900000069693020',\n",
       "           'location': '113.680539,23.650903'},\n",
       "          {'name': '黄围',\n",
       "           'id': '900000069693021',\n",
       "           'location': '113.680481,23.659002'},\n",
       "          {'name': '米埗',\n",
       "           'id': '900000069693022',\n",
       "           'location': '113.679240,23.677422'},\n",
       "          {'name': '高沙',\n",
       "           'id': '900000069693008',\n",
       "           'location': '113.694909,23.683199'},\n",
       "          {'name': '高沙村委',\n",
       "           'id': '900000069693023',\n",
       "           'location': '113.703644,23.683937'},\n",
       "          {'name': '热水',\n",
       "           'id': '900000069693024',\n",
       "           'location': '113.708473,23.689375'},\n",
       "          {'name': '马场路口',\n",
       "           'id': '900000069693027',\n",
       "           'location': '113.713211,23.694504'}]},\n",
       "        {'departure_stop': {'name': '卫东',\n",
       "          'id': '900000069253028',\n",
       "          'location': '113.671480,23.644076'},\n",
       "         'arrival_stop': {'name': '良明',\n",
       "          'id': '900000069253033',\n",
       "          'location': '113.718559,23.699049'},\n",
       "         'name': '从12路(从化汽车站总站--吕田客运站总站)',\n",
       "         'id': '900000069253',\n",
       "         'type': '普通公交线路',\n",
       "         'distance': '10091',\n",
       "         'duration': '1507',\n",
       "         'polyline': '113.671480,23.644076;113.671486,23.644075;113.673431,23.645147;113.674759,23.645876;113.675461,23.646276;113.675690,23.646431;113.675964,23.646635;113.676407,23.647018;113.677437,23.647961;113.677460,23.647978;113.679214,23.649567;113.679893,23.650187;113.680305,23.650612;113.680504,23.650869;113.680496,23.650869;113.680748,23.651180;113.680939,23.651493;113.681206,23.651995;113.681343,23.652327;113.681465,23.652742;113.681496,23.652842;113.681572,23.653294;113.681610,23.653542;113.681610,23.653564;113.681618,23.654007;113.681602,23.654289;113.681465,23.655142;113.681396,23.655506;113.680954,23.657209;113.680664,23.658319;113.680481,23.659002;113.680482,23.659002;113.680330,23.659575;113.680187,23.660074;113.680074,23.660391;113.679939,23.660707;113.679822,23.660951;113.679653,23.661237;113.679453,23.661541;113.679145,23.661910;113.678911,23.662170;113.678663,23.662487;113.677899,23.663381;113.677400,23.663963;113.677240,23.664201;113.677157,23.664362;113.677083,23.664549;113.677027,23.664774;113.677001,23.665074;113.677027,23.665621;113.677023,23.666007;113.677005,23.666155;113.676944,23.666385;113.676892,23.666541;113.676788,23.666745;113.676432,23.667374;113.675417,23.669102;113.675247,23.669388;113.674870,23.670022;113.674575,23.670564;113.674510,23.670716;113.674349,23.671150;113.674301,23.671363;113.674271,23.671628;113.674258,23.672010;113.674297,23.672391;113.674375,23.672717;113.674492,23.673060;113.674601,23.673273;113.674748,23.673520;113.675043,23.673893;113.675343,23.674193;113.675599,23.674418;113.676944,23.675534;113.677431,23.675933;113.678898,23.677148;113.679297,23.677465;113.679362,23.677513;113.679358,23.677513;113.679531,23.677635;113.679857,23.677843;113.680278,23.678056;113.680486,23.678147;113.680773,23.678255;113.681228,23.678377;113.681688,23.678477;113.682734,23.678624;113.683689,23.678759;113.684779,23.678880;113.685095,23.678902;113.685395,23.678889;113.685664,23.678832;113.686029,23.678698;113.686241,23.678581;113.686523,23.678398;113.686827,23.678207;113.687105,23.678073;113.687292,23.678003;113.687496,23.677956;113.687700,23.677921;113.687969,23.677908;113.688173,23.677917;113.688516,23.677977;113.688689,23.678025;113.688928,23.678121;113.689106,23.678207;113.689288,23.678325;113.689457,23.678455;113.691554,23.680560;113.692361,23.681289;113.693247,23.682014;113.694727,23.683069;113.696233,23.684141;113.696732,23.684492;113.697079,23.684735;113.697444,23.684944;113.697791,23.685104;113.697969,23.685165;113.698281,23.685239;113.698598,23.685291;113.698850,23.685304;113.699119,23.685304;113.699488,23.685265;113.699757,23.685208;113.700113,23.685095;113.700538,23.684891;113.700781,23.684744;113.701280,23.684397;113.701350,23.684349;113.701723,23.684102;113.701953,23.683984;113.702201,23.683889;113.702582,23.683802;113.702921,23.683785;113.703056,23.683798;113.703190,23.683811;113.703446,23.683872;113.703542,23.683906;113.703545,23.683907;113.703537,23.683907;113.703789,23.683992;113.704079,23.684172;113.704277,23.684326;113.704391,23.684435;113.704536,23.684608;113.704666,23.684835;113.704811,23.685160;113.705238,23.686525;113.705376,23.686979;113.705452,23.687172;113.705566,23.687435;113.705742,23.687729;113.705933,23.687946;113.706238,23.688211;113.706444,23.688351;113.706749,23.688524;113.706863,23.688576;113.707878,23.689075;113.708168,23.689219;113.708374,23.689322;113.708372,23.689323;113.708494,23.689388;113.708876,23.689579;113.709306,23.689835;113.709648,23.690074;113.710087,23.690412;113.710516,23.690812;113.710842,23.691163;113.711359,23.691849;113.712305,23.693255;113.712500,23.693550;113.712830,23.694041;113.713016,23.694280;113.713038,23.694306;113.713038,23.694301;113.713242,23.694544;113.713724,23.695061;113.713819,23.695156;113.714384,23.695651;113.715516,23.696554;113.715582,23.696606;113.715972,23.696918;113.716046,23.696975;113.716719,23.697509;113.718060,23.698568;113.718290,23.698772;113.718559,23.699049',\n",
       "         'bustimetag': '2',\n",
       "         'start_time': '0630',\n",
       "         'end_time': '1900',\n",
       "         'via_num': '8',\n",
       "         'via_stops': [{'name': '三层路口',\n",
       "           'id': '900000069253009',\n",
       "           'location': '113.677460,23.647978'},\n",
       "          {'name': '桥栏',\n",
       "           'id': '900000069253029',\n",
       "           'location': '113.680504,23.650869'},\n",
       "          {'name': '黄围',\n",
       "           'id': '900000069253030',\n",
       "           'location': '113.680481,23.659002'},\n",
       "          {'name': '米埗',\n",
       "           'id': '900000069253051',\n",
       "           'location': '113.679362,23.677513'},\n",
       "          {'name': '高沙',\n",
       "           'id': '900000069253031',\n",
       "           'location': '113.694727,23.683069'},\n",
       "          {'name': '高沙村委',\n",
       "           'id': '900000069253032',\n",
       "           'location': '113.703542,23.683906'},\n",
       "          {'name': '热水',\n",
       "           'id': '900000069253038',\n",
       "           'location': '113.708374,23.689322'},\n",
       "          {'name': '马场路口',\n",
       "           'id': '900000069253041',\n",
       "           'location': '113.713038,23.694306'}]}]},\n",
       "      'entrance': [],\n",
       "      'exit': [],\n",
       "      'railway': {'via_stops': [], 'alters': [], 'spaces': []}},\n",
       "     {'taxi': [],\n",
       "      'walking': {'origin': '113.718552,23.699045',\n",
       "       'destination': '113.716255,23.698929',\n",
       "       'distance': '297',\n",
       "       'duration': '254',\n",
       "       'steps': [{'instruction': '沿御泉大道步行72米右转',\n",
       "         'road': '御泉大道',\n",
       "         'distance': '72',\n",
       "         'duration': [],\n",
       "         'polyline': '113.718552,23.699045;113.718292,23.698780;113.718063,23.698576',\n",
       "         'action': '右转',\n",
       "         'assistant_action': []},\n",
       "        {'instruction': '步行213米向左前方行走',\n",
       "         'road': [],\n",
       "         'distance': '213',\n",
       "         'duration': [],\n",
       "         'polyline': '113.718063,23.698572;113.718002,23.698633;113.717880,23.698780;113.717735,23.698923;113.717621,23.699028;113.717422,23.699158;113.717125,23.699257;113.716850,23.699257;113.716728,23.699236;113.716476,23.699137;113.716309,23.699018',\n",
       "         'action': '向左前方行走',\n",
       "         'assistant_action': []},\n",
       "        {'instruction': '步行12米',\n",
       "         'road': [],\n",
       "         'distance': '12',\n",
       "         'duration': [],\n",
       "         'polyline': '113.716309,23.699015;113.716301,23.698954;113.716255,23.698929',\n",
       "         'action': [],\n",
       "         'assistant_action': []}]},\n",
       "      'bus': {'buslines': []},\n",
       "      'entrance': [],\n",
       "      'exit': [],\n",
       "      'railway': {'via_stops': [], 'alters': [], 'spaces': []}}]},\n",
       "   {'cost': '4.0',\n",
       "    'duration': '3631',\n",
       "    'nightflag': '0',\n",
       "    'walking_distance': '861',\n",
       "    'distance': '12472',\n",
       "    'missed': '1',\n",
       "    'segments': [{'taxi': [],\n",
       "      'walking': {'origin': '113.679016,23.632349',\n",
       "       'destination': '113.676613,23.631285',\n",
       "       'distance': '513',\n",
       "       'duration': '439',\n",
       "       'steps': [{'instruction': '步行57米右转',\n",
       "         'road': [],\n",
       "         'distance': '57',\n",
       "         'duration': [],\n",
       "         'polyline': '113.679016,23.632349;113.678528,23.632097',\n",
       "         'action': '右转',\n",
       "         'assistant_action': []},\n",
       "        {'instruction': '步行47米向左前方行走',\n",
       "         'road': [],\n",
       "         'distance': '47',\n",
       "         'duration': [],\n",
       "         'polyline': '113.678528,23.632092;113.678398,23.632166;113.678101,23.632261',\n",
       "         'action': '向左前方行走',\n",
       "         'assistant_action': []},\n",
       "        {'instruction': '步行218米左转',\n",
       "         'road': [],\n",
       "         'distance': '218',\n",
       "         'duration': [],\n",
       "         'polyline': '113.678101,23.632261;113.677834,23.632261;113.677551,23.632200;113.677399,23.632179;113.677284,23.632200;113.677177,23.632244;113.677017,23.632357;113.676811,23.632534;113.676582,23.632778;113.676430,23.632904;113.676292,23.632969',\n",
       "         'action': '左转',\n",
       "         'assistant_action': []},\n",
       "        {'instruction': '沿博学路步行191米到达中大南方学院',\n",
       "         'road': '博学路',\n",
       "         'distance': '191',\n",
       "         'duration': [],\n",
       "         'polyline': '113.676285,23.632969;113.676292,23.632227;113.676338,23.631948;113.676430,23.631676;113.676491,23.631540;113.676613,23.631285',\n",
       "         'action': [],\n",
       "         'assistant_action': '到达中大南方学院'}]},\n",
       "      'bus': {'buslines': [{'departure_stop': {'name': '中大南方学院',\n",
       "          'id': '900000111141002',\n",
       "          'location': '113.676613,23.631281'},\n",
       "         'arrival_stop': {'name': '卫东',\n",
       "          'id': '900000111141003',\n",
       "          'location': '113.671707,23.643766'},\n",
       "         'name': '从15路(中大南方学院--从化汽车站总站)',\n",
       "         'id': '900000111141',\n",
       "         'type': '普通公交线路',\n",
       "         'distance': '1703',\n",
       "         'duration': '1496',\n",
       "         'polyline': '113.676613,23.631281;113.676460,23.631588;113.676430,23.631672;113.676338,23.631945;113.676292,23.632223;113.676285,23.632969;113.676285,23.633560;113.676300,23.633738;113.676331,23.633875;113.676399,23.634016;113.676460,23.634111;113.676521,23.634193;113.676781,23.634409;113.676857,23.634357;113.676933,23.634340;113.677032,23.634354;113.677094,23.634396;113.677139,23.634459;113.677147,23.634535;113.677139,23.634600;113.677086,23.634663;113.677032,23.634701;113.676918,23.634718;113.676857,23.634701;113.676788,23.634657;113.675262,23.636129;113.675156,23.636263;113.675026,23.636467;113.674973,23.636566;113.674957,23.636702;113.674957,23.636845;113.674995,23.636995;113.675377,23.637886;113.675430,23.638042;113.675522,23.638659;113.675529,23.638998;113.675514,23.639132;113.675446,23.639311;113.675331,23.639582;113.675102,23.640036;113.675003,23.640186;113.674309,23.641024;113.673347,23.642139;113.672981,23.642536;113.672935,23.642578;113.672173,23.643307;113.671707,23.643766',\n",
       "         'bustimetag': '2',\n",
       "         'start_time': '0900',\n",
       "         'end_time': '1800',\n",
       "         'via_num': '0',\n",
       "         'via_stops': []}]},\n",
       "      'entrance': [],\n",
       "      'exit': [],\n",
       "      'railway': {'via_stops': [], 'alters': [], 'spaces': []}},\n",
       "     {'taxi': [],\n",
       "      'walking': {'origin': '113.671707,23.643766',\n",
       "       'destination': '113.671509,23.644093',\n",
       "       'distance': '51',\n",
       "       'duration': '43',\n",
       "       'steps': [{'instruction': '沿中山路步行42米右转',\n",
       "         'road': '中山路',\n",
       "         'distance': '42',\n",
       "         'duration': [],\n",
       "         'polyline': '113.671707,23.643766;113.671425,23.644045',\n",
       "         'action': '右转',\n",
       "         'assistant_action': []},\n",
       "        {'instruction': '沿温泉大道步行9米到达卫东',\n",
       "         'road': '温泉大道',\n",
       "         'distance': '9',\n",
       "         'duration': [],\n",
       "         'polyline': '113.671425,23.644045;113.671509,23.644093',\n",
       "         'action': [],\n",
       "         'assistant_action': '到达卫东'}]},\n",
       "      'bus': {'buslines': [{'departure_stop': {'name': '卫东',\n",
       "          'id': '900000069693007',\n",
       "          'location': '113.671509,23.644089'},\n",
       "         'arrival_stop': {'name': '良明',\n",
       "          'id': '900000069693026',\n",
       "          'location': '113.718513,23.698997'},\n",
       "         'name': '从11路(从化汽车站总站--良口客运站总站)',\n",
       "         'id': '900000069693',\n",
       "         'type': '普通公交线路',\n",
       "         'distance': '9908',\n",
       "         'duration': '1397',\n",
       "         'polyline': '113.671509,23.644089;113.673424,23.645147;113.674164,23.645538;113.674759,23.645876;113.675461,23.646276;113.675972,23.646641;113.676201,23.646828;113.676392,23.647001;113.677032,23.647587;113.677338,23.647856;113.677444,23.647961;113.677605,23.648108;113.679214,23.649567;113.679893,23.650187;113.680305,23.650612;113.680539,23.650903;113.680752,23.651187;113.680936,23.651476;113.681114,23.651801;113.681206,23.651995;113.681343,23.652327;113.681465,23.652742;113.681498,23.652866;113.681574,23.653284;113.681601,23.653521;113.681608,23.653597;113.681618,23.654007;113.681604,23.654227;113.681583,23.654376;113.681465,23.655142;113.681396,23.655506;113.681236,23.656142;113.680954,23.657209;113.680664,23.658319;113.680481,23.659002;113.680482,23.659002;113.680330,23.659575;113.680187,23.660074;113.680074,23.660391;113.679939,23.660707;113.679822,23.660951;113.679653,23.661237;113.679453,23.661541;113.679145,23.661910;113.678911,23.662170;113.678663,23.662487;113.677899,23.663381;113.677400,23.663963;113.677240,23.664201;113.677157,23.664362;113.677083,23.664549;113.677027,23.664774;113.677001,23.665074;113.677027,23.665621;113.677023,23.666007;113.677005,23.666155;113.676944,23.666385;113.676892,23.666541;113.676788,23.666745;113.676432,23.667374;113.675417,23.669102;113.675247,23.669388;113.674870,23.670022;113.674575,23.670564;113.674510,23.670716;113.674349,23.671150;113.674301,23.671363;113.674271,23.671628;113.674258,23.672010;113.674297,23.672391;113.674375,23.672717;113.674492,23.673060;113.674601,23.673273;113.674748,23.673520;113.675043,23.673893;113.675343,23.674193;113.675599,23.674418;113.676944,23.675534;113.677431,23.675933;113.678898,23.677148;113.679240,23.677422;113.679236,23.677422;113.679297,23.677465;113.679531,23.677635;113.679857,23.677843;113.680278,23.678056;113.680486,23.678147;113.680773,23.678255;113.681012,23.678328;113.681233,23.678382;113.681688,23.678477;113.682691,23.678615;113.683682,23.678764;113.684173,23.678822;113.684785,23.678884;113.685099,23.678907;113.685395,23.678889;113.685664,23.678832;113.685852,23.678773;113.686039,23.678698;113.686242,23.678587;113.686523,23.678398;113.686827,23.678207;113.687105,23.678073;113.687292,23.678003;113.687496,23.677956;113.687700,23.677921;113.687969,23.677908;113.688173,23.677917;113.688516,23.677977;113.688689,23.678025;113.688928,23.678121;113.689106,23.678207;113.689288,23.678325;113.689457,23.678455;113.689899,23.678886;113.691554,23.680560;113.692361,23.681289;113.693247,23.682014;113.693938,23.682520;113.694909,23.683199;113.694908,23.683201;113.694908,23.683203;113.696236,23.684141;113.696724,23.684496;113.697083,23.684734;113.697273,23.684856;113.697441,23.684948;113.697792,23.685104;113.697968,23.685165;113.698280,23.685244;113.698441,23.685274;113.698593,23.685291;113.698853,23.685308;113.699112,23.685305;113.699341,23.685286;113.699493,23.685265;113.699615,23.685244;113.699890,23.685169;113.700104,23.685095;113.700264,23.685034;113.700539,23.684891;113.700768,23.684757;113.701035,23.684574;113.701347,23.684349;113.701721,23.684101;113.701965,23.683985;113.702202,23.683884;113.702324,23.683849;113.702583,23.683802;113.702705,23.683794;113.702927,23.683788;113.703056,23.683798;113.703194,23.683811;113.703438,23.683867;113.703644,23.683937;113.703697,23.683954;113.703842,23.684029;113.704079,23.684172;113.704285,23.684328;113.704391,23.684435;113.704529,23.684614;113.704720,23.684938;113.704811,23.685160;113.704865,23.685316;113.705307,23.686749;113.705482,23.687279;113.705566,23.687431;113.705681,23.687609;113.705750,23.687725;113.705833,23.687843;113.705940,23.687946;113.706093,23.688095;113.706337,23.688286;113.706451,23.688351;113.706566,23.688425;113.706802,23.688551;113.707863,23.689072;113.708473,23.689375;113.708496,23.689388;113.708878,23.689577;113.709305,23.689837;113.709648,23.690073;113.710091,23.690413;113.710518,23.690811;113.710846,23.691164;113.711357,23.691849;113.712326,23.693298;113.712502,23.693552;113.712830,23.694040;113.712975,23.694235;113.713211,23.694504;113.713242,23.694544;113.713722,23.695061;113.713821,23.695156;113.714386,23.695652;113.715523,23.696554;113.715584,23.696608;113.715973,23.696918;113.716042,23.696976;113.716721,23.697510;113.718063,23.698568;113.718330,23.698811;113.718513,23.698997',\n",
       "         'bustimetag': '2',\n",
       "         'start_time': '0630',\n",
       "         'end_time': '1930',\n",
       "         'via_num': '8',\n",
       "         'via_stops': [{'name': '三层路口',\n",
       "           'id': '900000069693019',\n",
       "           'location': '113.677605,23.648108'},\n",
       "          {'name': '桥栏',\n",
       "           'id': '900000069693020',\n",
       "           'location': '113.680539,23.650903'},\n",
       "          {'name': '黄围',\n",
       "           'id': '900000069693021',\n",
       "           'location': '113.680481,23.659002'},\n",
       "          {'name': '米埗',\n",
       "           'id': '900000069693022',\n",
       "           'location': '113.679240,23.677422'},\n",
       "          {'name': '高沙',\n",
       "           'id': '900000069693008',\n",
       "           'location': '113.694909,23.683199'},\n",
       "          {'name': '高沙村委',\n",
       "           'id': '900000069693023',\n",
       "           'location': '113.703644,23.683937'},\n",
       "          {'name': '热水',\n",
       "           'id': '900000069693024',\n",
       "           'location': '113.708473,23.689375'},\n",
       "          {'name': '马场路口',\n",
       "           'id': '900000069693027',\n",
       "           'location': '113.713211,23.694504'}]},\n",
       "        {'departure_stop': {'name': '卫东',\n",
       "          'id': '900000069253028',\n",
       "          'location': '113.671480,23.644076'},\n",
       "         'arrival_stop': {'name': '良明',\n",
       "          'id': '900000069253033',\n",
       "          'location': '113.718559,23.699049'},\n",
       "         'name': '从12路(从化汽车站总站--吕田客运站总站)',\n",
       "         'id': '900000069253',\n",
       "         'type': '普通公交线路',\n",
       "         'distance': '10091',\n",
       "         'duration': '1507',\n",
       "         'polyline': '113.671480,23.644076;113.671486,23.644075;113.673431,23.645147;113.674759,23.645876;113.675461,23.646276;113.675690,23.646431;113.675964,23.646635;113.676407,23.647018;113.677437,23.647961;113.677460,23.647978;113.679214,23.649567;113.679893,23.650187;113.680305,23.650612;113.680504,23.650869;113.680496,23.650869;113.680748,23.651180;113.680939,23.651493;113.681206,23.651995;113.681343,23.652327;113.681465,23.652742;113.681496,23.652842;113.681572,23.653294;113.681610,23.653542;113.681610,23.653564;113.681618,23.654007;113.681602,23.654289;113.681465,23.655142;113.681396,23.655506;113.680954,23.657209;113.680664,23.658319;113.680481,23.659002;113.680482,23.659002;113.680330,23.659575;113.680187,23.660074;113.680074,23.660391;113.679939,23.660707;113.679822,23.660951;113.679653,23.661237;113.679453,23.661541;113.679145,23.661910;113.678911,23.662170;113.678663,23.662487;113.677899,23.663381;113.677400,23.663963;113.677240,23.664201;113.677157,23.664362;113.677083,23.664549;113.677027,23.664774;113.677001,23.665074;113.677027,23.665621;113.677023,23.666007;113.677005,23.666155;113.676944,23.666385;113.676892,23.666541;113.676788,23.666745;113.676432,23.667374;113.675417,23.669102;113.675247,23.669388;113.674870,23.670022;113.674575,23.670564;113.674510,23.670716;113.674349,23.671150;113.674301,23.671363;113.674271,23.671628;113.674258,23.672010;113.674297,23.672391;113.674375,23.672717;113.674492,23.673060;113.674601,23.673273;113.674748,23.673520;113.675043,23.673893;113.675343,23.674193;113.675599,23.674418;113.676944,23.675534;113.677431,23.675933;113.678898,23.677148;113.679297,23.677465;113.679362,23.677513;113.679358,23.677513;113.679531,23.677635;113.679857,23.677843;113.680278,23.678056;113.680486,23.678147;113.680773,23.678255;113.681228,23.678377;113.681688,23.678477;113.682734,23.678624;113.683689,23.678759;113.684779,23.678880;113.685095,23.678902;113.685395,23.678889;113.685664,23.678832;113.686029,23.678698;113.686241,23.678581;113.686523,23.678398;113.686827,23.678207;113.687105,23.678073;113.687292,23.678003;113.687496,23.677956;113.687700,23.677921;113.687969,23.677908;113.688173,23.677917;113.688516,23.677977;113.688689,23.678025;113.688928,23.678121;113.689106,23.678207;113.689288,23.678325;113.689457,23.678455;113.691554,23.680560;113.692361,23.681289;113.693247,23.682014;113.694727,23.683069;113.696233,23.684141;113.696732,23.684492;113.697079,23.684735;113.697444,23.684944;113.697791,23.685104;113.697969,23.685165;113.698281,23.685239;113.698598,23.685291;113.698850,23.685304;113.699119,23.685304;113.699488,23.685265;113.699757,23.685208;113.700113,23.685095;113.700538,23.684891;113.700781,23.684744;113.701280,23.684397;113.701350,23.684349;113.701723,23.684102;113.701953,23.683984;113.702201,23.683889;113.702582,23.683802;113.702921,23.683785;113.703056,23.683798;113.703190,23.683811;113.703446,23.683872;113.703542,23.683906;113.703545,23.683907;113.703537,23.683907;113.703789,23.683992;113.704079,23.684172;113.704277,23.684326;113.704391,23.684435;113.704536,23.684608;113.704666,23.684835;113.704811,23.685160;113.705238,23.686525;113.705376,23.686979;113.705452,23.687172;113.705566,23.687435;113.705742,23.687729;113.705933,23.687946;113.706238,23.688211;113.706444,23.688351;113.706749,23.688524;113.706863,23.688576;113.707878,23.689075;113.708168,23.689219;113.708374,23.689322;113.708372,23.689323;113.708494,23.689388;113.708876,23.689579;113.709306,23.689835;113.709648,23.690074;113.710087,23.690412;113.710516,23.690812;113.710842,23.691163;113.711359,23.691849;113.712305,23.693255;113.712500,23.693550;113.712830,23.694041;113.713016,23.694280;113.713038,23.694306;113.713038,23.694301;113.713242,23.694544;113.713724,23.695061;113.713819,23.695156;113.714384,23.695651;113.715516,23.696554;113.715582,23.696606;113.715972,23.696918;113.716046,23.696975;113.716719,23.697509;113.718060,23.698568;113.718290,23.698772;113.718559,23.699049',\n",
       "         'bustimetag': '2',\n",
       "         'start_time': '0630',\n",
       "         'end_time': '1900',\n",
       "         'via_num': '8',\n",
       "         'via_stops': [{'name': '三层路口',\n",
       "           'id': '900000069253009',\n",
       "           'location': '113.677460,23.647978'},\n",
       "          {'name': '桥栏',\n",
       "           'id': '900000069253029',\n",
       "           'location': '113.680504,23.650869'},\n",
       "          {'name': '黄围',\n",
       "           'id': '900000069253030',\n",
       "           'location': '113.680481,23.659002'},\n",
       "          {'name': '米埗',\n",
       "           'id': '900000069253051',\n",
       "           'location': '113.679362,23.677513'},\n",
       "          {'name': '高沙',\n",
       "           'id': '900000069253031',\n",
       "           'location': '113.694727,23.683069'},\n",
       "          {'name': '高沙村委',\n",
       "           'id': '900000069253032',\n",
       "           'location': '113.703542,23.683906'},\n",
       "          {'name': '热水',\n",
       "           'id': '900000069253038',\n",
       "           'location': '113.708374,23.689322'},\n",
       "          {'name': '马场路口',\n",
       "           'id': '900000069253041',\n",
       "           'location': '113.713038,23.694306'}]}]},\n",
       "      'entrance': [],\n",
       "      'exit': [],\n",
       "      'railway': {'via_stops': [], 'alters': [], 'spaces': []}},\n",
       "     {'taxi': [],\n",
       "      'walking': {'origin': '113.718552,23.699045',\n",
       "       'destination': '113.716255,23.698929',\n",
       "       'distance': '297',\n",
       "       'duration': '254',\n",
       "       'steps': [{'instruction': '沿御泉大道步行72米右转',\n",
       "         'road': '御泉大道',\n",
       "         'distance': '72',\n",
       "         'duration': [],\n",
       "         'polyline': '113.718552,23.699045;113.718292,23.698780;113.718063,23.698576',\n",
       "         'action': '右转',\n",
       "         'assistant_action': []},\n",
       "        {'instruction': '步行213米向左前方行走',\n",
       "         'road': [],\n",
       "         'distance': '213',\n",
       "         'duration': [],\n",
       "         'polyline': '113.718063,23.698572;113.718002,23.698633;113.717880,23.698780;113.717735,23.698923;113.717621,23.699028;113.717422,23.699158;113.717125,23.699257;113.716850,23.699257;113.716728,23.699236;113.716476,23.699137;113.716309,23.699018',\n",
       "         'action': '向左前方行走',\n",
       "         'assistant_action': []},\n",
       "        {'instruction': '步行12米',\n",
       "         'road': [],\n",
       "         'distance': '12',\n",
       "         'duration': [],\n",
       "         'polyline': '113.716309,23.699015;113.716301,23.698954;113.716255,23.698929',\n",
       "         'action': [],\n",
       "         'assistant_action': []}]},\n",
       "      'bus': {'buslines': []},\n",
       "      'entrance': [],\n",
       "      'exit': [],\n",
       "      'railway': {'via_stops': [], 'alters': [], 'spaces': []}}]}]}}"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 调用公交路规划\n",
    "bus_plan = bus(crisp_key,\"113.679287,23.632575\",\"113.716229,23.698900\",\"广州\")\n",
    "bus_plan"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 驾车路径规划\n",
    "1. 驾车路径规划API可以规划以小客车、轿车通勤出行的方案，并且返回通勤方案的数据。\n",
    "\n",
    "  - URL:https://restapi.amap.com/v3/direction/driving?parameters\n",
    "  - 请求参数：key,origin,destination(两者使用经纬度)\n",
    "  - 请求方式：requests.get()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000',\n",
       " 'count': '1',\n",
       " 'route': {'origin': '113.679287,23.632575',\n",
       "  'destination': '113.716229,23.698900',\n",
       "  'taxi_cost': '33',\n",
       "  'paths': [{'distance': '11694',\n",
       "    'duration': '1084',\n",
       "    'strategy': '速度最快',\n",
       "    'tolls': '0',\n",
       "    'toll_distance': '0',\n",
       "    'steps': [{'instruction': '向北行驶122米向左前方行驶',\n",
       "      'orientation': '北',\n",
       "      'distance': '122',\n",
       "      'tolls': '0',\n",
       "      'toll_distance': '0',\n",
       "      'toll_road': [],\n",
       "      'duration': '23',\n",
       "      'polyline': '113.679596,23.632574;113.679596,23.632856;113.679592,23.633173;113.679596,23.633251;113.679627,23.63365;113.679648,23.633689',\n",
       "      'action': '向左前方行驶',\n",
       "      'assistant_action': [],\n",
       "      'tmcs': [{'lcode': [],\n",
       "        'distance': '31',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.679596,23.632574;113.679596,23.632856'},\n",
       "       {'lcode': [],\n",
       "        'distance': '34',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.679596,23.632856;113.679592,23.633173'},\n",
       "       {'lcode': [],\n",
       "        'distance': '9',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.679592,23.633173;113.679596,23.633251'},\n",
       "       {'lcode': [],\n",
       "        'distance': '48',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.679596,23.633251;113.679627,23.63365;113.679648,23.633689'}],\n",
       "      'cities': [{'name': '广州市',\n",
       "        'citycode': '020',\n",
       "        'adcode': '440100',\n",
       "        'districts': [{'name': '从化区', 'adcode': '440117'}]}]},\n",
       "     {'instruction': '沿博学路向北行驶79米向左前方行驶',\n",
       "      'orientation': '北',\n",
       "      'road': '博学路',\n",
       "      'distance': '79',\n",
       "      'tolls': '0',\n",
       "      'toll_distance': '0',\n",
       "      'toll_road': [],\n",
       "      'duration': '17',\n",
       "      'polyline': '113.679648,23.633689;113.679549,23.633967;113.679375,23.634358',\n",
       "      'action': '向左前方行驶',\n",
       "      'assistant_action': [],\n",
       "      'tmcs': [{'lcode': [],\n",
       "        'distance': '32',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.679648,23.633689;113.679549,23.633967'},\n",
       "       {'lcode': [],\n",
       "        'distance': '47',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.679549,23.633967;113.679375,23.634358'}],\n",
       "      'cities': [{'name': '广州市',\n",
       "        'citycode': '020',\n",
       "        'adcode': '440100',\n",
       "        'districts': [{'name': '从化区', 'adcode': '440117'}]}]},\n",
       "     {'instruction': '沿博学路向西北行驶118米左转',\n",
       "      'orientation': '西北',\n",
       "      'road': '博学路',\n",
       "      'distance': '118',\n",
       "      'tolls': '0',\n",
       "      'toll_distance': '0',\n",
       "      'toll_road': [],\n",
       "      'duration': '27',\n",
       "      'polyline': '113.679375,23.634358;113.679249,23.634479;113.678932,23.634761;113.678711,23.634918;113.678628,23.63497;113.678594,23.63503;113.678555,23.635109',\n",
       "      'action': '左转',\n",
       "      'assistant_action': [],\n",
       "      'tmcs': [{'lcode': [],\n",
       "        'distance': '19',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.679375,23.634358;113.679249,23.634479'},\n",
       "       {'lcode': [],\n",
       "        'distance': '72',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.679249,23.634479;113.678932,23.634761;113.678711,23.634918'},\n",
       "       {'lcode': [],\n",
       "        'distance': '27',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.678711,23.634918;113.678628,23.63497;113.678594,23.63503;113.678555,23.635109'}],\n",
       "      'cities': [{'name': '广州市',\n",
       "        'citycode': '020',\n",
       "        'adcode': '440100',\n",
       "        'districts': [{'name': '从化区', 'adcode': '440117'}]}]},\n",
       "     {'instruction': '沿博学路向西行驶163米右转',\n",
       "      'orientation': '西',\n",
       "      'road': '博学路',\n",
       "      'distance': '163',\n",
       "      'tolls': '0',\n",
       "      'toll_distance': '0',\n",
       "      'toll_road': [],\n",
       "      'duration': '31',\n",
       "      'polyline': '113.678555,23.635109;113.677856,23.635087;113.677613,23.63503;113.67753,23.634991;113.677326,23.634852;113.677083,23.634661',\n",
       "      'action': '右转',\n",
       "      'assistant_action': [],\n",
       "      'tmcs': [{'lcode': [],\n",
       "        'distance': '106',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.678555,23.635109;113.677856,23.635087;113.677613,23.63503;113.67753,23.634991'},\n",
       "       {'lcode': [],\n",
       "        'distance': '25',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.67753,23.634991;113.677326,23.634852'},\n",
       "       {'lcode': [],\n",
       "        'distance': '32',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.677326,23.634852;113.677083,23.634661'}],\n",
       "      'cities': [{'name': '广州市',\n",
       "        'citycode': '020',\n",
       "        'adcode': '440100',\n",
       "        'districts': [{'name': '从化区', 'adcode': '440117'}]}]},\n",
       "     {'instruction': '沿博学路向西行驶33米右转',\n",
       "      'orientation': '西',\n",
       "      'road': '博学路',\n",
       "      'distance': '33',\n",
       "      'tolls': '0',\n",
       "      'toll_distance': '0',\n",
       "      'toll_road': [],\n",
       "      'duration': '9',\n",
       "      'polyline': '113.677083,23.634661;113.677027,23.634701;113.676918,23.634718;113.676849,23.634701;113.676788,23.634657',\n",
       "      'action': '右转',\n",
       "      'assistant_action': [],\n",
       "      'tmcs': [{'lcode': [],\n",
       "        'distance': '33',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.677083,23.634661;113.677027,23.634701;113.676918,23.634718;113.676849,23.634701;113.676788,23.634657'}],\n",
       "      'cities': [{'name': '广州市',\n",
       "        'citycode': '020',\n",
       "        'adcode': '440100',\n",
       "        'districts': [{'name': '从化区', 'adcode': '440117'}]}]},\n",
       "     {'instruction': '沿中山路向西北行驶1.3千米右转',\n",
       "      'orientation': '西北',\n",
       "      'road': '中山路',\n",
       "      'distance': '1265',\n",
       "      'tolls': '0',\n",
       "      'toll_distance': '0',\n",
       "      'toll_road': [],\n",
       "      'duration': '269',\n",
       "      'polyline': '113.676788,23.634657;113.675265,23.636128;113.675152,23.636263;113.675026,23.636467;113.67497,23.636567;113.674957,23.636701;113.674957,23.636845;113.674991,23.636997;113.675378,23.637886;113.67543,23.638043;113.675521,23.638659;113.67553,23.638997;113.675508,23.639132;113.675447,23.63931;113.67533,23.639583;113.675104,23.640035;113.675,23.640187;113.67431,23.641024;113.673355,23.64214;113.672977,23.642535;113.672934,23.642578;113.67217,23.643307;113.671428,23.644045',\n",
       "      'action': '右转',\n",
       "      'assistant_action': [],\n",
       "      'tmcs': [{'lcode': [],\n",
       "        'distance': '576',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.676788,23.634657;113.675265,23.636128;113.675152,23.636263;113.675026,23.636467;113.67497,23.636567;113.674957,23.636701;113.674957,23.636845;113.674991,23.636997;113.675378,23.637886;113.67543,23.638043;113.675521,23.638659;113.67553,23.638997;113.675508,23.639132'},\n",
       "       {'lcode': [],\n",
       "        'distance': '578',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.675508,23.639132;113.675447,23.63931;113.67533,23.639583;113.675104,23.640035;113.675,23.640187;113.67431,23.641024;113.673355,23.64214;113.672977,23.642535;113.672934,23.642578;113.67217,23.643307'},\n",
       "       {'lcode': [],\n",
       "        'distance': '111',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.67217,23.643307;113.671428,23.644045'}],\n",
       "      'cities': [{'name': '广州市',\n",
       "        'citycode': '020',\n",
       "        'adcode': '440100',\n",
       "        'districts': [{'name': '从化区', 'adcode': '440117'}]}]},\n",
       "     {'instruction': '沿温泉大道途径高沙一桥、御泉大道向东北行驶9.7千米左转',\n",
       "      'orientation': '东北',\n",
       "      'road': '温泉大道',\n",
       "      'distance': '9677',\n",
       "      'tolls': '0',\n",
       "      'toll_distance': '0',\n",
       "      'toll_road': [],\n",
       "      'duration': '615',\n",
       "      'polyline': '113.671428,23.644045;113.671636,23.644162;113.673103,23.64497;113.673945,23.645425;113.674366,23.645651;113.67546,23.646276;113.675968,23.646636;113.676411,23.647018;113.677439,23.64796;113.679219,23.649566;113.679896,23.650187;113.680299,23.650612;113.680751,23.651181;113.680946,23.651493;113.681159,23.651879;113.681341,23.652326;113.681445,23.652656;113.681545,23.653108;113.681606,23.653542;113.681606,23.653563;113.681619,23.654006;113.681597,23.654288;113.681467,23.655143;113.681393,23.655508;113.680955,23.657209;113.680664,23.65832;113.68033,23.659575;113.680187,23.660074;113.680074,23.660391;113.679939,23.660707;113.679822,23.660951;113.679653,23.661237;113.679453,23.661541;113.67931,23.661714;113.678967,23.662109;113.678663,23.662487;113.677899,23.663381;113.6774,23.663963;113.67724,23.664201;113.677157,23.664362;113.677083,23.664544;113.677083,23.664549;113.677027,23.664774;113.677001,23.665074;113.677027,23.665842;113.677005,23.666155;113.676944,23.666385;113.676892,23.666541;113.676706,23.666897;113.676432,23.667374;113.675417,23.669102;113.675247,23.669388;113.67487,23.670022;113.674575,23.670564;113.67451,23.670716;113.674349,23.67115;113.674301,23.671363;113.674271,23.671628;113.674258,23.67201;113.674297,23.672391;113.674375,23.672717;113.674492,23.67306;113.674601,23.673273;113.674748,23.67352;113.675043,23.673893;113.675343,23.674193;113.675599,23.674418;113.676944,23.675534;113.677431,23.675933;113.678898,23.677148;113.679297,23.677465;113.679531,23.677635;113.679857,23.677843;113.680278,23.678056;113.680486,23.678147;113.680773,23.678255;113.681228,23.678377;113.681688,23.678477;113.682691,23.678615;113.683689,23.678759;113.684779,23.67888;113.685095,23.678902;113.685395,23.678889;113.685664,23.678832;113.686029,23.678698;113.686241,23.678581;113.686523,23.678398;113.686827,23.678207;113.687105,23.678073;113.687292,23.678003;113.687496,23.677956;113.6877,23.677921;113.687969,23.677908;113.688173,23.677917;113.688516,23.677977;113.688689,23.678025;113.688928,23.678121;113.689106,23.678207;113.689288,23.678325;113.689457,23.678455;113.691554,23.68056;113.692361,23.681289;113.693247,23.682014;113.696233,23.684141;113.696732,23.684492;113.697079,23.684735;113.697444,23.684944;113.697791,23.685104;113.697969,23.685165;113.698281,23.685239;113.698598,23.685291;113.69885,23.685304;113.699119,23.685304;113.699488,23.685265;113.699757,23.685208;113.700113,23.685095;113.700538,23.684891;113.700781,23.684744;113.70128,23.684397;113.70135,23.684349;113.701723,23.684102;113.701953,23.683984;113.702201,23.683889;113.702582,23.683802;113.702921,23.683785;113.703056,23.683798;113.70319,23.683811;113.703446,23.683872;113.703785,23.683993;113.704084,23.684171;113.70428,23.684327;113.704388,23.684436;113.704531,23.684609;113.704666,23.684835;113.704809,23.685161;113.705234,23.686523;113.705378,23.686979;113.705447,23.68717;113.705564,23.687435;113.705747,23.68773;113.705933,23.687947;113.706237,23.688212;113.706445,23.688351;113.706749,23.688524;113.706858,23.688576;113.707873,23.689076;113.708173,23.689219;113.708494,23.689388;113.708876,23.689579;113.709306,23.689835;113.709648,23.690074;113.710087,23.690412;113.710516,23.690812;113.710842,23.691163;113.711359,23.691849;113.712292,23.693234;113.712487,23.693537;113.712604,23.693711;113.71283,23.694041;113.713016,23.69428;113.713242,23.694544;113.713785,23.695122;113.714384,23.695651;113.715516,23.696554;113.715582,23.696606;113.715972,23.696918;113.716046,23.696975;113.716719,23.697509;113.71806,23.698568',\n",
       "      'action': '左转',\n",
       "      'assistant_action': [],\n",
       "      'tmcs': [{'lcode': [],\n",
       "        'distance': '25',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.671428,23.644045;113.671636,23.644162'},\n",
       "       {'lcode': [],\n",
       "        'distance': '174',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.671636,23.644162;113.673103,23.64497'},\n",
       "       {'lcode': [],\n",
       "        'distance': '99',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.673103,23.64497;113.673945,23.645425'},\n",
       "       {'lcode': [],\n",
       "        'distance': '49',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.673945,23.645425;113.674366,23.645651'},\n",
       "       {'lcode': [],\n",
       "        'distance': '258',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.674366,23.645651;113.67546,23.646276;113.675968,23.646636;113.676411,23.647018'},\n",
       "       {'lcode': [],\n",
       "        'distance': '148',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.676411,23.647018;113.677439,23.64796'},\n",
       "       {'lcode': [],\n",
       "        'distance': '351',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.677439,23.64796;113.679219,23.649566;113.679896,23.650187'},\n",
       "       {'lcode': [],\n",
       "        'distance': '62',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.679896,23.650187;113.680299,23.650612'},\n",
       "       {'lcode': [],\n",
       "        'distance': '77',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.680299,23.650612;113.680751,23.651181'},\n",
       "       {'lcode': [],\n",
       "        'distance': '178',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.680751,23.651181;113.680946,23.651493;113.681159,23.651879;113.681341,23.652326;113.681445,23.652656'},\n",
       "       {'lcode': [],\n",
       "        'distance': '512',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.681445,23.652656;113.681545,23.653108;113.681606,23.653542;113.681606,23.653563;113.681619,23.654006;113.681597,23.654288;113.681467,23.655143;113.681393,23.655508;113.680955,23.657209'},\n",
       "       {'lcode': [],\n",
       "        'distance': '126',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.680955,23.657209;113.680664,23.65832'},\n",
       "       {'lcode': [],\n",
       "        'distance': '340',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.680664,23.65832;113.68033,23.659575;113.680187,23.660074;113.680074,23.660391;113.679939,23.660707;113.679822,23.660951;113.679653,23.661237'},\n",
       "       {'lcode': [],\n",
       "        'distance': '119',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.679653,23.661237;113.679453,23.661541;113.67931,23.661714;113.678967,23.662109'},\n",
       "       {'lcode': [],\n",
       "        'distance': '52',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.678967,23.662109;113.678663,23.662487'},\n",
       "       {'lcode': [],\n",
       "        'distance': '125',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.678663,23.662487;113.677899,23.663381'},\n",
       "       {'lcode': [],\n",
       "        'distance': '82',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.677899,23.663381;113.6774,23.663963'},\n",
       "       {'lcode': [],\n",
       "        'distance': '72',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.6774,23.663963;113.67724,23.664201;113.677157,23.664362;113.677083,23.664544'},\n",
       "       {'lcode': [],\n",
       "        'distance': '327',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.677083,23.664544;113.677083,23.664549;113.677027,23.664774;113.677001,23.665074;113.677027,23.665842;113.677005,23.666155;113.676944,23.666385;113.676892,23.666541;113.676706,23.666897;113.676432,23.667374'},\n",
       "       {'lcode': [],\n",
       "        'distance': '217',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.676432,23.667374;113.675417,23.669102'},\n",
       "       {'lcode': [],\n",
       "        'distance': '36',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.675417,23.669102;113.675247,23.669388'},\n",
       "       {'lcode': [],\n",
       "        'distance': '871',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.675247,23.669388;113.67487,23.670022;113.674575,23.670564;113.67451,23.670716;113.674349,23.67115;113.674301,23.671363;113.674271,23.671628;113.674258,23.67201;113.674297,23.672391;113.674375,23.672717;113.674492,23.67306;113.674601,23.673273;113.674748,23.67352;113.675043,23.673893;113.675343,23.674193;113.675599,23.674418;113.676944,23.675534;113.677431,23.675933'},\n",
       "       {'lcode': [],\n",
       "        'distance': '201',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.677431,23.675933;113.678898,23.677148'},\n",
       "       {'lcode': [],\n",
       "        'distance': '83',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.678898,23.677148;113.679297,23.677465;113.679531,23.677635'},\n",
       "       {'lcode': [],\n",
       "        'distance': '113',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.679531,23.677635;113.679857,23.677843;113.680278,23.678056;113.680486,23.678147'},\n",
       "       {'lcode': [],\n",
       "        'distance': '31',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.680486,23.678147;113.680773,23.678255'},\n",
       "       {'lcode': [],\n",
       "        'distance': '200',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.680773,23.678255;113.681228,23.678377;113.681688,23.678477;113.682691,23.678615'},\n",
       "       {'lcode': [],\n",
       "        'distance': '567',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.682691,23.678615;113.683689,23.678759;113.684779,23.67888;113.685095,23.678902;113.685395,23.678889;113.685664,23.678832;113.686029,23.678698;113.686241,23.678581;113.686523,23.678398;113.686827,23.678207;113.687105,23.678073;113.687292,23.678003;113.687496,23.677956;113.6877,23.677921;113.687969,23.677908'},\n",
       "       {'lcode': [],\n",
       "        'distance': '101',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.687969,23.677908;113.688173,23.677917;113.688516,23.677977;113.688689,23.678025;113.688928,23.678121'},\n",
       "       {'lcode': [],\n",
       "        'distance': '65',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.688928,23.678121;113.689106,23.678207;113.689288,23.678325;113.689457,23.678455'},\n",
       "       {'lcode': [],\n",
       "        'distance': '938',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.689457,23.678455;113.691554,23.68056;113.692361,23.681289;113.693247,23.682014;113.696233,23.684141'},\n",
       "       {'lcode': [],\n",
       "        'distance': '64',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.696233,23.684141;113.696732,23.684492'},\n",
       "       {'lcode': [],\n",
       "        'distance': '180',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.696732,23.684492;113.697079,23.684735;113.697444,23.684944;113.697791,23.685104;113.697969,23.685165;113.698281,23.685239'},\n",
       "       {'lcode': [],\n",
       "        'distance': '332',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.698281,23.685239;113.698598,23.685291;113.69885,23.685304;113.699119,23.685304;113.699488,23.685265;113.699757,23.685208;113.700113,23.685095;113.700538,23.684891;113.700781,23.684744;113.70128,23.684397'},\n",
       "       {'lcode': [],\n",
       "        'distance': '8',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.70128,23.684397;113.70135,23.684349'},\n",
       "       {'lcode': [],\n",
       "        'distance': '189',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.70135,23.684349;113.701723,23.684102;113.701953,23.683984;113.702201,23.683889;113.702582,23.683802;113.702921,23.683785;113.703056,23.683798'},\n",
       "       {'lcode': [],\n",
       "        'distance': '41',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.703056,23.683798;113.70319,23.683811;113.703446,23.683872'},\n",
       "       {'lcode': [],\n",
       "        'distance': '608',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.703446,23.683872;113.703785,23.683993;113.704084,23.684171;113.70428,23.684327;113.704388,23.684436;113.704531,23.684609;113.704666,23.684835;113.704809,23.685161;113.705234,23.686523;113.705378,23.686979;113.705447,23.68717;113.705564,23.687435;113.705747,23.68773;113.705933,23.687947;113.706237,23.688212;113.706445,23.688351'},\n",
       "       {'lcode': [],\n",
       "        'distance': '48',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.706445,23.688351;113.706749,23.688524;113.706858,23.688576'},\n",
       "       {'lcode': [],\n",
       "        'distance': '117',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.706858,23.688576;113.707873,23.689076'},\n",
       "       {'lcode': [],\n",
       "        'distance': '34',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.707873,23.689076;113.708173,23.689219'},\n",
       "       {'lcode': [],\n",
       "        'distance': '133',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.708173,23.689219;113.708494,23.689388;113.708876,23.689579;113.709306,23.689835'},\n",
       "       {'lcode': [],\n",
       "        'distance': '216',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.709306,23.689835;113.709648,23.690074;113.710087,23.690412;113.710516,23.690812;113.710842,23.691163'},\n",
       "       {'lcode': [],\n",
       "        'distance': '272',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.710842,23.691163;113.711359,23.691849;113.712292,23.693234'},\n",
       "       {'lcode': [],\n",
       "        'distance': '61',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.712292,23.693234;113.712487,23.693537;113.712604,23.693711'},\n",
       "       {'lcode': [],\n",
       "        'distance': '197',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.712604,23.693711;113.71283,23.694041;113.713016,23.69428;113.713242,23.694544;113.713785,23.695122'},\n",
       "       {'lcode': [],\n",
       "        'distance': '246',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.713785,23.695122;113.714384,23.695651;113.715516,23.696554;113.715582,23.696606'},\n",
       "       {'lcode': [],\n",
       "        'distance': '52',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.715582,23.696606;113.715972,23.696918'},\n",
       "       {'lcode': [],\n",
       "        'distance': '10',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.715972,23.696918;113.716046,23.696975'},\n",
       "       {'lcode': [],\n",
       "        'distance': '270',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.716046,23.696975;113.716719,23.697509;113.71806,23.698568'}],\n",
       "      'cities': [{'name': '广州市',\n",
       "        'citycode': '020',\n",
       "        'adcode': '440100',\n",
       "        'districts': [{'name': '从化区', 'adcode': '440117'}]}]},\n",
       "     {'instruction': '向西行驶204米右转',\n",
       "      'orientation': '西',\n",
       "      'distance': '204',\n",
       "      'tolls': '0',\n",
       "      'toll_distance': '0',\n",
       "      'toll_road': [],\n",
       "      'duration': '80',\n",
       "      'polyline': '113.717999,23.698633;113.717878,23.69878;113.717617,23.699028;113.717504,23.69911;113.717344,23.699193;113.717118,23.699258;113.716853,23.699258;113.716723,23.699227;113.716471,23.699132;113.716306,23.699015',\n",
       "      'action': '右转',\n",
       "      'assistant_action': [],\n",
       "      'tmcs': [{'lcode': [],\n",
       "        'distance': '20',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.717999,23.698633;113.717878,23.69878'},\n",
       "       {'lcode': [],\n",
       "        'distance': '95',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.717878,23.69878;113.717617,23.699028;113.717504,23.69911;113.717344,23.699193;113.717118,23.699258'},\n",
       "       {'lcode': [],\n",
       "        'distance': '40',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.717118,23.699258;113.716853,23.699258;113.716723,23.699227'},\n",
       "       {'lcode': [],\n",
       "        'distance': '49',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.716723,23.699227;113.716471,23.699132;113.716306,23.699015'}],\n",
       "      'cities': [{'name': '广州市',\n",
       "        'citycode': '020',\n",
       "        'adcode': '440100',\n",
       "        'districts': [{'name': '从化区', 'adcode': '440117'}]}]},\n",
       "     {'instruction': '向西行驶14米左转',\n",
       "      'orientation': '西',\n",
       "      'distance': '14',\n",
       "      'tolls': '0',\n",
       "      'toll_distance': '0',\n",
       "      'toll_road': [],\n",
       "      'duration': '6',\n",
       "      'polyline': '113.716306,23.699015;113.716254,23.699063;113.716194,23.699054',\n",
       "      'action': '左转',\n",
       "      'assistant_action': [],\n",
       "      'tmcs': [{'lcode': [],\n",
       "        'distance': '14',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.716306,23.699015;113.716254,23.699063;113.716194,23.699054'}],\n",
       "      'cities': [{'name': '广州市',\n",
       "        'citycode': '020',\n",
       "        'adcode': '440100',\n",
       "        'districts': [{'name': '从化区', 'adcode': '440117'}]}]},\n",
       "     {'instruction': '向南行驶14米向左前方行驶',\n",
       "      'orientation': '南',\n",
       "      'distance': '14',\n",
       "      'tolls': '0',\n",
       "      'toll_distance': '0',\n",
       "      'toll_road': [],\n",
       "      'duration': '6',\n",
       "      'polyline': '113.716194,23.699054;113.716159,23.698993;113.716185,23.698941',\n",
       "      'action': '向左前方行驶',\n",
       "      'assistant_action': [],\n",
       "      'tmcs': [{'lcode': [],\n",
       "        'distance': '14',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.716194,23.699054;113.716159,23.698993;113.716185,23.698941'}],\n",
       "      'cities': [{'name': '广州市',\n",
       "        'citycode': '020',\n",
       "        'adcode': '440100',\n",
       "        'districts': [{'name': '从化区', 'adcode': '440117'}]}]},\n",
       "     {'instruction': '向东行驶5米到达目的地',\n",
       "      'orientation': '东',\n",
       "      'distance': '5',\n",
       "      'tolls': '0',\n",
       "      'toll_distance': '0',\n",
       "      'toll_road': [],\n",
       "      'duration': '1',\n",
       "      'polyline': '113.716185,23.698941;113.716228,23.698924',\n",
       "      'action': [],\n",
       "      'assistant_action': '到达目的地',\n",
       "      'tmcs': [{'lcode': [],\n",
       "        'distance': '5',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.716185,23.698941;113.716228,23.698924'}],\n",
       "      'cities': [{'name': '广州市',\n",
       "        'citycode': '020',\n",
       "        'adcode': '440100',\n",
       "        'districts': [{'name': '从化区', 'adcode': '440117'}]}]}],\n",
       "    'restriction': '0',\n",
       "    'traffic_lights': '2'}]}}"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 调用驾车路径规划\n",
    "car_plan = car(crisp_key,\"113.679287,23.632575\",\"113.716229,23.698900\")\n",
    "car_plan"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 骑行路径规划\n",
    "1. 骑行路径规划用于规划骑行通勤方案，规划时不会考虑路况；考虑天桥、单行线、封路等情况。\n",
    "\n",
    "  - URL:https://restapi.amap.com/v4/direction/bicycling?parameters\n",
    "  - 请求参数：key,origin,destination(两者使用经纬度)\n",
    "  - 请求方式：requests.get()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[{'action': '向左前方行驶',\n",
       "  'assistant_action': '',\n",
       "  'distance': 92,\n",
       "  'duration': 22,\n",
       "  'instruction': '向北骑行92米向左前方行驶',\n",
       "  'orientation': '北',\n",
       "  'polyline': '113.679592,23.632856;113.679592,23.633173;113.679592,23.633173;113.679592,23.633251;113.679592,23.633251;113.679622,23.63365;113.679648,23.633689',\n",
       "  'road': '',\n",
       "  'walk_type': 0},\n",
       " {'action': '左转',\n",
       "  'assistant_action': '',\n",
       "  'distance': 197,\n",
       "  'duration': 47,\n",
       "  'instruction': '沿博学路向西北骑行197米左转',\n",
       "  'orientation': '西北',\n",
       "  'polyline': '113.679648,23.633689;113.679553,23.633967;113.679553,23.633967;113.679375,23.634358;113.679375,23.634358;113.679253,23.634479;113.679253,23.634479;113.679058,23.634657;113.679058,23.634657;113.678932,23.634761;113.678711,23.634918;113.678711,23.634918;113.678637,23.63497;113.678598,23.63503;113.678559,23.635109',\n",
       "  'road': '博学路',\n",
       "  'walk_type': 0},\n",
       " {'action': '右转',\n",
       "  'assistant_action': '',\n",
       "  'distance': 163,\n",
       "  'duration': 39,\n",
       "  'instruction': '沿博学路向西骑行163米右转',\n",
       "  'orientation': '西',\n",
       "  'polyline': '113.678555,23.635109;113.67786,23.635091;113.677613,23.635035;113.677539,23.634996;113.677539,23.634996;113.677331,23.634857;113.677331,23.634857;113.677088,23.63467',\n",
       "  'road': '博学路',\n",
       "  'walk_type': 0},\n",
       " {'action': '右转',\n",
       "  'assistant_action': '',\n",
       "  'distance': 33,\n",
       "  'duration': 8,\n",
       "  'instruction': '沿博学路向西骑行33米右转',\n",
       "  'orientation': '西',\n",
       "  'polyline': '113.677083,23.634666;113.677027,23.634701;113.676918,23.634718;113.676853,23.634705;113.676797,23.634661',\n",
       "  'road': '博学路',\n",
       "  'walk_type': 0},\n",
       " {'action': '右转',\n",
       "  'assistant_action': '',\n",
       "  'distance': 1265,\n",
       "  'duration': 304,\n",
       "  'instruction': '沿中山路向西北骑行1265米右转',\n",
       "  'orientation': '西北',\n",
       "  'polyline': '113.676793,23.634657;113.675273,23.636128;113.675156,23.636263;113.675026,23.636467;113.674974,23.636567;113.674961,23.636701;113.674961,23.636845;113.674991,23.636997;113.675382,23.637886;113.67543,23.638043;113.675521,23.638659;113.675525,23.638997;113.675508,23.639132;113.675508,23.639132;113.675456,23.63931;113.675334,23.639583;113.675113,23.640035;113.675004,23.640187;113.674319,23.641024;113.673364,23.64214;113.672982,23.642535;113.672174,23.643303;113.672174,23.643303;113.671428,23.644045',\n",
       "  'road': '中山路',\n",
       "  'walk_type': 0},\n",
       " {'action': '直行',\n",
       "  'assistant_action': '',\n",
       "  'distance': 1420,\n",
       "  'duration': 341,\n",
       "  'instruction': '沿温泉大道向东北骑行1420米直行',\n",
       "  'orientation': '东北',\n",
       "  'polyline': '113.671424,23.644045;113.671636,23.644162;113.671636,23.644162;113.673103,23.64497;113.673103,23.64497;113.67395,23.645425;113.67395,23.645425;113.674366,23.645651;113.674366,23.645651;113.67546,23.646276;113.675968,23.646636;113.676411,23.647018;113.676411,23.647018;113.677444,23.647964;113.677444,23.647964;113.677496,23.648012;113.677496,23.648012;113.678581,23.648989;113.678581,23.648989;113.6799,23.650187;113.6799,23.650187;113.680295,23.650612;113.680295,23.650612;113.680747,23.651181;113.680747,23.651181;113.680946,23.651493;113.681159,23.651879;113.681341,23.652326;113.68145,23.652656',\n",
       "  'road': '温泉大道',\n",
       "  'walk_type': 0},\n",
       " {'action': '左转',\n",
       "  'assistant_action': '',\n",
       "  'distance': 8248,\n",
       "  'duration': 1980,\n",
       "  'instruction': '沿御泉大道向东北骑行8248米左转',\n",
       "  'orientation': '东北',\n",
       "  'polyline': '113.68145,23.652656;113.681493,23.652843;113.681493,23.652843;113.681576,23.653294;113.681606,23.653542;113.681615,23.654006;113.681606,23.654288;113.681476,23.655143;113.681398,23.655508;113.680955,23.657209;113.680955,23.657209;113.680664,23.65832;113.680664,23.65832;113.680286,23.65977;113.680286,23.65977;113.680078,23.660391;113.679826,23.660951;113.679657,23.661241;113.679657,23.661241;113.679453,23.661541;113.679314,23.661714;113.678971,23.662109;113.678971,23.662109;113.678668,23.662487;113.678668,23.662487;113.678398,23.662813;113.678398,23.662813;113.677904,23.663381;113.677904,23.663381;113.677409,23.663963;113.677409,23.663963;113.677248,23.664201;113.677157,23.664362;113.677088,23.664544;113.677088,23.664544;113.677027,23.664774;113.677005,23.665074;113.677023,23.665842;113.677014,23.666155;113.676949,23.666385;113.676897,23.666536;113.676706,23.666897;113.676432,23.667374;113.676432,23.667374;113.675425,23.669102;113.675425,23.669102;113.675247,23.669388;113.675247,23.669388;113.674874,23.670022;113.674579,23.670564;113.674358,23.67115;113.674301,23.671363;113.674271,23.671628;113.674266,23.67201;113.674297,23.672391;113.674375,23.672717;113.674497,23.67306;113.674605,23.673273;113.674748,23.673516;113.675039,23.673893;113.675343,23.674193;113.675595,23.674418;113.677105,23.675668;113.677105,23.675668;113.677426,23.675933;113.677426,23.675933;113.678898,23.677148;113.678898,23.677148;113.679479,23.677595;113.679479,23.677595;113.679531,23.677635;113.679531,23.677635;113.679861,23.677843;113.680282,23.678056;113.680282,23.678056;113.680486,23.678147;113.680486,23.678147;113.680768,23.678255;113.680768,23.678255;113.681228,23.678377;113.681684,23.678472;113.682691,23.678615;113.682691,23.678615;113.683689,23.678759;113.684774,23.67888;113.685095,23.678902;113.685391,23.678893;113.685668,23.678841;113.686024,23.678702;113.686237,23.678585;113.686827,23.678212;113.687109,23.678077;113.687292,23.678008;113.6875,23.677956;113.687704,23.677925;113.687969,23.677908;113.687969,23.677908;113.688177,23.677917;113.68852,23.677977;113.688689,23.678025;113.688932,23.678121;113.688932,23.678121;113.689106,23.678207;113.689293,23.678325;113.689457,23.678455;113.689457,23.678455;113.691558,23.68056;113.69181,23.68079;113.69181,23.68079;113.692365,23.681293;113.69316,23.681944;113.69316,23.681944;113.694592,23.682982;113.694592,23.682982;113.696233,23.684141;113.696233,23.684141;113.696727,23.684492;113.696727,23.684492;113.697079,23.684735;113.697448,23.684944;113.697791,23.685104;113.697964,23.685165;113.698277,23.685239;113.698277,23.685239;113.698598,23.685291;113.69885,23.685304;113.699119,23.685304;113.699484,23.685269;113.699757,23.685213;113.700117,23.6851;113.700538,23.684896;113.700781,23.684748;113.701276,23.684401;113.701276,23.684401;113.701345,23.684353;113.701345,23.684353;113.701727,23.684106;113.701957,23.683989;113.702201,23.683893;113.702582,23.683806;113.702917,23.683789;113.703056,23.683798;113.703056,23.683798;113.70319,23.683811;113.703442,23.683872;113.703442,23.683872;113.703503,23.683889;113.703503,23.683889;113.703785,23.683993;113.704084,23.684171;113.704275,23.684327;113.704388,23.684436;113.704527,23.684614;113.704666,23.684835;113.704809,23.685161;113.705373,23.686979;113.705564,23.687435;113.705747,23.68773;113.705938,23.687947;113.706237,23.688212;113.706441,23.688351;113.706441,23.688351;113.706745,23.68852;113.706745,23.68852;113.706862,23.688576;113.706862,23.688576;113.707869,23.689076;113.707869,23.689076;113.70816,23.689214;113.70816,23.689214;113.708173,23.689219;113.708173,23.689219;113.708876,23.689579;113.709301,23.689835;113.709301,23.689835;113.709644,23.690074;113.710087,23.690412;113.710295,23.690595;113.710295,23.690595;113.710638,23.690938;113.710842,23.691163;113.710842,23.691163;113.711354,23.691849;113.712292,23.693229;113.712292,23.693229;113.712483,23.693537;113.712483,23.693537;113.712604,23.693711;113.712604,23.693711;113.712826,23.694041;113.713238,23.694549;113.71378,23.695122;113.71378,23.695122;113.714384,23.695651;113.715512,23.696554;113.715512,23.696554;113.715582,23.696606;113.715582,23.696606;113.715972,23.696918;113.715972,23.696918;113.716046,23.696979;113.716046,23.696979;113.716862,23.697626;113.716862,23.697626;113.71806,23.698572',\n",
       "  'road': '御泉大道',\n",
       "  'walk_type': 0},\n",
       " {'action': '向左前方行驶',\n",
       "  'assistant_action': '',\n",
       "  'distance': 213,\n",
       "  'duration': 51,\n",
       "  'instruction': '向西骑行213米向左前方行驶',\n",
       "  'orientation': '西',\n",
       "  'polyline': '113.71806,23.698572;113.718003,23.698633;113.718003,23.698633;113.717882,23.69878;113.717882,23.69878;113.717739,23.698924;113.717739,23.698924;113.717622,23.699028;113.717622,23.699028;113.717426,23.699158;113.717127,23.699258;113.717127,23.699258;113.716853,23.699258;113.716732,23.699236;113.716732,23.699236;113.71648,23.699136;113.716311,23.699019',\n",
       "  'road': '',\n",
       "  'walk_type': 0},\n",
       " {'action': '',\n",
       "  'assistant_action': '到达目的地',\n",
       "  'distance': 12,\n",
       "  'duration': 3,\n",
       "  'instruction': '向西南骑行12米到达目的地',\n",
       "  'orientation': '西南',\n",
       "  'polyline': '113.716306,23.699015;113.716302,23.698954;113.716259,23.698928',\n",
       "  'road': '',\n",
       "  'walk_type': 0}]"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 调用骑行路径规划\n",
    "bicycle_plan = bicycle(crisp_key,\"113.679287,23.632575\",\"113.716229,23.698900\")\n",
    "bicycle_plan"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 距离测量\n",
    "1. 用于测量两地之间的距离。\n",
    "\n",
    "  - URL:https://restapi.amap.com/v3/distance?parameters\n",
    "  - 请求参数：key,origin,destination(两者使用经纬度)\n",
    "  - 请求方式：requests.get()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'11626'"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 调用\n",
    "distance_measurement = distance(crisp_key,\"113.679287,23.632575\",\"113.716229,23.698900\")\n",
    "distance_measurement"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 行政区域查询\n",
    "1. 行政区域查询是一类简单的HTTP接口，根据用户输入的搜索条件可以帮助用户快速的查找特定的行政区域信息。\n",
    "2. 适用场景：用户希望通过得到行政区域信息，进行开发工作。\n",
    "\n",
    " - URL:https://restapi.amap.com/v3/config/district?parameters\n",
    " - 请求参数：key(必填)\n",
    " - 请求参数(选填)：keywords(关键字查询，支持行政区名称、citycode、adcode),其余见https://lbs.amap.com/api/webservice/guide/api/district\n",
    " - 请求方式：requests.get()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[{'citycode': '0754',\n",
       "  'adcode': '440500',\n",
       "  'name': '汕头市',\n",
       "  'center': '116.708463,23.37102',\n",
       "  'level': 'city',\n",
       "  'districts': []},\n",
       " {'citycode': '0757',\n",
       "  'adcode': '440600',\n",
       "  'name': '佛山市',\n",
       "  'center': '113.122717,23.028762',\n",
       "  'level': 'city',\n",
       "  'districts': []},\n",
       " {'citycode': '0758',\n",
       "  'adcode': '441200',\n",
       "  'name': '肇庆市',\n",
       "  'center': '112.472529,23.051546',\n",
       "  'level': 'city',\n",
       "  'districts': []},\n",
       " {'citycode': '0752',\n",
       "  'adcode': '441300',\n",
       "  'name': '惠州市',\n",
       "  'center': '114.412599,23.079404',\n",
       "  'level': 'city',\n",
       "  'districts': []},\n",
       " {'citycode': '0755',\n",
       "  'adcode': '440300',\n",
       "  'name': '深圳市',\n",
       "  'center': '114.085947,22.547',\n",
       "  'level': 'city',\n",
       "  'districts': []},\n",
       " {'citycode': '0756',\n",
       "  'adcode': '440400',\n",
       "  'name': '珠海市',\n",
       "  'center': '113.553986,22.224979',\n",
       "  'level': 'city',\n",
       "  'districts': []},\n",
       " {'citycode': '0759',\n",
       "  'adcode': '440800',\n",
       "  'name': '湛江市',\n",
       "  'center': '110.364977,21.274898',\n",
       "  'level': 'city',\n",
       "  'districts': []},\n",
       " {'citycode': '0662',\n",
       "  'adcode': '441700',\n",
       "  'name': '阳江市',\n",
       "  'center': '111.975107,21.859222',\n",
       "  'level': 'city',\n",
       "  'districts': []},\n",
       " {'citycode': '0750',\n",
       "  'adcode': '440700',\n",
       "  'name': '江门市',\n",
       "  'center': '113.094942,22.590431',\n",
       "  'level': 'city',\n",
       "  'districts': []},\n",
       " {'citycode': '0753',\n",
       "  'adcode': '441400',\n",
       "  'name': '梅州市',\n",
       "  'center': '116.117582,24.299112',\n",
       "  'level': 'city',\n",
       "  'districts': []},\n",
       " {'citycode': '0668',\n",
       "  'adcode': '440900',\n",
       "  'name': '茂名市',\n",
       "  'center': '110.919229,21.659751',\n",
       "  'level': 'city',\n",
       "  'districts': []},\n",
       " {'citycode': '0768',\n",
       "  'adcode': '445100',\n",
       "  'name': '潮州市',\n",
       "  'center': '116.632301,23.661701',\n",
       "  'level': 'city',\n",
       "  'districts': []},\n",
       " {'citycode': '0660',\n",
       "  'adcode': '441500',\n",
       "  'name': '汕尾市',\n",
       "  'center': '115.364238,22.774485',\n",
       "  'level': 'city',\n",
       "  'districts': []},\n",
       " {'citycode': '0766',\n",
       "  'adcode': '445300',\n",
       "  'name': '云浮市',\n",
       "  'center': '112.044439,22.929801',\n",
       "  'level': 'city',\n",
       "  'districts': []},\n",
       " {'citycode': '0762',\n",
       "  'adcode': '441600',\n",
       "  'name': '河源市',\n",
       "  'center': '114.697802,23.746266',\n",
       "  'level': 'city',\n",
       "  'districts': []},\n",
       " {'citycode': '0663',\n",
       "  'adcode': '445200',\n",
       "  'name': '揭阳市',\n",
       "  'center': '116.355733,23.543778',\n",
       "  'level': 'city',\n",
       "  'districts': []},\n",
       " {'citycode': '0763',\n",
       "  'adcode': '441800',\n",
       "  'name': '清远市',\n",
       "  'center': '113.051227,23.685022',\n",
       "  'level': 'city',\n",
       "  'districts': []},\n",
       " {'citycode': '0751',\n",
       "  'adcode': '440200',\n",
       "  'name': '韶关市',\n",
       "  'center': '113.591544,24.801322',\n",
       "  'level': 'city',\n",
       "  'districts': []},\n",
       " {'citycode': '020',\n",
       "  'adcode': '440100',\n",
       "  'name': '广州市',\n",
       "  'center': '113.280637,23.125178',\n",
       "  'level': 'city',\n",
       "  'districts': []},\n",
       " {'citycode': '0760',\n",
       "  'adcode': '442000',\n",
       "  'name': '中山市',\n",
       "  'center': '113.382391,22.521113',\n",
       "  'level': 'city',\n",
       "  'districts': []},\n",
       " {'citycode': '0769',\n",
       "  'adcode': '441900',\n",
       "  'name': '东莞市',\n",
       "  'center': '113.746262,23.046237',\n",
       "  'level': 'city',\n",
       "  'districts': []}]"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 调用\n",
    "enquiry = administrative_region(crisp_key,\"广东\")\n",
    "enquiry"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 搜索POI\n",
    "\n",
    "* 搜索服务API是一类简单的HTTP接口，提供多种查询POI信息的能力，其中包括关键字搜索、周边搜索、多边形搜索、ID查询四种筛选机制。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 关键字搜索\n",
    "1. 通过用POI的关键字进行条件搜索，例如：肯德基、朝阳公园等；同时支持设置POI类型搜索，例如：银行\n",
    "\n",
    " - URL:https://restapi.amap.com/v3/place/text?parameters\n",
    " - 请求参数(必填)：key,keywords和types(二选一)\n",
    " - 请求方式：requests.get()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'suggestion': {'keywords': [], 'cities': []},\n",
       " 'count': '878',\n",
       " 'infocode': '10000',\n",
       " 'pois': [{'parent': 'B0FFIGLX5N',\n",
       "   'address': '新港西路135号',\n",
       "   'distance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': []},\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': [],\n",
       "   'cityname': '广州市',\n",
       "   'type': '科教文化服务;学校;高等院校',\n",
       "   'photos': [{'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/f2ffc7743773caf2aab3929e9e02a997'},\n",
       "    {'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/4699806b0fc67194a8c6ee5cf3ed6266'},\n",
       "    {'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/a9dd44d4d4e70cf01aaf96da95c4f35b'}],\n",
       "   'typecode': '141201',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': '309',\n",
       "   'adname': '海珠区',\n",
       "   'name': '中山大学广州校区南校园',\n",
       "   'location': '113.298395,23.096729',\n",
       "   'tel': '020-84112828;020-84036491',\n",
       "   'shopid': [],\n",
       "   'id': 'B00141IHRZ'},\n",
       "  {'parent': [],\n",
       "   'address': [],\n",
       "   'distance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': '4.4'},\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': [],\n",
       "   'cityname': '广州市',\n",
       "   'type': '科教文化服务;学校;高等院校',\n",
       "   'photos': [{'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/8fcd793dfa3a108091766a3715426afd'}],\n",
       "   'typecode': '141201',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '海珠区',\n",
       "   'name': '中山大学',\n",
       "   'location': '113.297228,23.091182',\n",
       "   'tel': '020-84112828',\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFIGLX5N'},\n",
       "  {'parent': [],\n",
       "   'address': '滨江路新港西路135号',\n",
       "   'distance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': []},\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': [],\n",
       "   'cityname': '广州市',\n",
       "   'type': '科教文化服务;学校;高等院校',\n",
       "   'photos': [{'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/fb7debb4d1f2b63a21d9cbd05dadc721'},\n",
       "    {'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/a9dd44d4d4e70cf01aaf96da95c4f35b'},\n",
       "    {'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/4699806b0fc67194a8c6ee5cf3ed6266'}],\n",
       "   'typecode': '141201',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '海珠区',\n",
       "   'name': '中山大学(海珠校区)',\n",
       "   'location': '113.303932,23.094743',\n",
       "   'tel': '020-84112828',\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFGKLYFZ'},\n",
       "  {'parent': 'B0FFJGE87R',\n",
       "   'address': '大学城外环东路132号',\n",
       "   'distance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': []},\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': [],\n",
       "   'cityname': '广州市',\n",
       "   'type': '科教文化服务;学校;高等院校',\n",
       "   'photos': [{'provider': [],\n",
       "     'title': '内景图',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/10aeb375d7caffddb577941b73276447'},\n",
       "    {'provider': [],\n",
       "     'title': '内景图',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/015ad788f1d27854e0686b7b57d58877'},\n",
       "    {'provider': [],\n",
       "     'title': '外景图',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/ac7f13c04a5e9d6b281e7758049cc2e2'}],\n",
       "   'typecode': '141201',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': '309',\n",
       "   'adname': '番禺区',\n",
       "   'name': '中山大学广州校区东校园',\n",
       "   'location': '113.391786,23.067691',\n",
       "   'tel': '020-39332007',\n",
       "   'shopid': [],\n",
       "   'id': 'B00140BD3O'},\n",
       "  {'parent': [],\n",
       "   'address': '中山二路74号',\n",
       "   'distance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': '5.0'},\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': [],\n",
       "   'cityname': '广州市',\n",
       "   'type': '科教文化服务;学校;高等院校',\n",
       "   'photos': [{'provider': [],\n",
       "     'title': '外景图',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/1f7914914b8eba7fa53e68cde1538839'},\n",
       "    {'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/4dd64ad0ac99a7c80f7faff6c92eea22'},\n",
       "    {'provider': [],\n",
       "     'title': '外景图',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/d7c42be00f5f565862d7ed1a06cf59af'}],\n",
       "   'typecode': '141201',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '越秀区',\n",
       "   'name': '中山大学广州校区北校园',\n",
       "   'location': '113.289848,23.128255',\n",
       "   'tel': '020-87333018',\n",
       "   'shopid': [],\n",
       "   'id': 'B001403454'},\n",
       "  {'parent': [],\n",
       "   'address': '贝岗村青云坊十巷5号蔚然锦和超市',\n",
       "   'distance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': '3.0'},\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': [],\n",
       "   'cityname': '广州市',\n",
       "   'type': '科教文化服务;学校;高等院校',\n",
       "   'photos': [{'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/da0f03a11a8c93017bc1106af40d0091'},\n",
       "    {'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/0206152a085034e0fabfd7c217d006d6'},\n",
       "    {'provider': [],\n",
       "     'title': '商户图片',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/de8462f95d300ebdf81e728a909c3674'}],\n",
       "   'typecode': '141201',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '番禺区',\n",
       "   'name': '中山大学',\n",
       "   'location': '113.391350,23.060548',\n",
       "   'tel': '18127840848',\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFJGE87R'},\n",
       "  {'parent': 'B0FFJGE87R',\n",
       "   'address': '大学城外环东路132号中山大学东校区中山大学生活区内',\n",
       "   'distance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': []},\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': [],\n",
       "   'cityname': '广州市',\n",
       "   'type': '通行设施;临街院门;临街院门',\n",
       "   'photos': [{'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://aos-cdn-image.amap.com/sns/ugccomment/1d3d10ac-5db6-4d42-93cc-634d8ec81f54.jpg'}],\n",
       "   'typecode': '991400',\n",
       "   'shopinfo': '2',\n",
       "   'poiweight': [],\n",
       "   'childtype': '101',\n",
       "   'adname': '番禺区',\n",
       "   'name': '中山大学(西北门)',\n",
       "   'location': '113.388403,23.061703',\n",
       "   'tel': [],\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFHY4FBH'},\n",
       "  {'parent': 'B0FFJGE87R',\n",
       "   'address': '贝岗村大街',\n",
       "   'distance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': []},\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': [],\n",
       "   'cityname': '广州市',\n",
       "   'type': '通行设施;临街院门;临街院门',\n",
       "   'photos': [],\n",
       "   'typecode': '991400',\n",
       "   'shopinfo': '2',\n",
       "   'poiweight': [],\n",
       "   'childtype': '101',\n",
       "   'adname': '番禺区',\n",
       "   'name': '中山大学(东门)',\n",
       "   'location': '113.391411,23.060436',\n",
       "   'tel': [],\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFLQ4AEQ'},\n",
       "  {'parent': 'B0FFGKLYFZ',\n",
       "   'address': '园东路尽头',\n",
       "   'distance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': []},\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': [],\n",
       "   'cityname': '广州市',\n",
       "   'type': '通行设施;临街院门;临街院门',\n",
       "   'photos': [],\n",
       "   'typecode': '991400',\n",
       "   'shopinfo': '2',\n",
       "   'poiweight': [],\n",
       "   'childtype': '101',\n",
       "   'adname': '海珠区',\n",
       "   'name': '中山大学(小北门)',\n",
       "   'location': '113.303903,23.101376',\n",
       "   'tel': [],\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFI5XZ5T'},\n",
       "  {'parent': [],\n",
       "   'address': '大学城外环东路与逸仙大道交叉口东南100米',\n",
       "   'distance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': []},\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': [],\n",
       "   'cityname': '广州市',\n",
       "   'type': '科教文化服务;学校;高等院校',\n",
       "   'photos': [],\n",
       "   'typecode': '141201',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '番禺区',\n",
       "   'name': '国立中山大学',\n",
       "   'location': '113.391895,23.071001',\n",
       "   'tel': [],\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFHNI4GV'},\n",
       "  {'parent': 'B001403454',\n",
       "   'address': '中山二路74号中山大学北校区',\n",
       "   'distance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': []},\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': [],\n",
       "   'cityname': '广州市',\n",
       "   'type': '科教文化服务;学校;高等院校',\n",
       "   'photos': [{'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/7a90a33fe8a6058639a639519ef766b4'},\n",
       "    {'provider': [],\n",
       "     'title': '内景图',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/480457db372cdf574863b535c053c100'},\n",
       "    {'provider': [],\n",
       "     'title': '外景图',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/35b438c3c8bbdaaaf17979639d675dc6'}],\n",
       "   'typecode': '141201',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': '309',\n",
       "   'adname': '越秀区',\n",
       "   'name': '中山大学中山医学院',\n",
       "   'location': '113.290365,23.127024',\n",
       "   'tel': [],\n",
       "   'shopid': [],\n",
       "   'id': 'B00140TVB2'},\n",
       "  {'parent': 'B001403454',\n",
       "   'address': '中山二路72号附近',\n",
       "   'distance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': []},\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': [],\n",
       "   'cityname': '广州市',\n",
       "   'type': '科教文化服务;学校;高等院校',\n",
       "   'photos': [{'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/3456fb2dbfc12cfa4360388c56ce0a27'}],\n",
       "   'typecode': '141201',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': '309',\n",
       "   'adname': '越秀区',\n",
       "   'name': '中山大学-医学部',\n",
       "   'location': '113.289338,23.127305',\n",
       "   'tel': [],\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFHK2VJ7'},\n",
       "  {'parent': 'B0FFIGLX5N',\n",
       "   'address': '新港西路135号中山大学',\n",
       "   'distance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': []},\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': [],\n",
       "   'cityname': '广州市',\n",
       "   'type': '科教文化服务;学校;高等院校',\n",
       "   'photos': [{'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/ac0ada9cbb2867c4c57d4b4bf698230a'}],\n",
       "   'typecode': '141201',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': '309',\n",
       "   'adname': '海珠区',\n",
       "   'name': '中山大学管理学院',\n",
       "   'location': '113.292377,23.093221',\n",
       "   'tel': '020-84112602',\n",
       "   'shopid': [],\n",
       "   'id': 'B00141RGVQ'},\n",
       "  {'parent': 'B001403454',\n",
       "   'address': '中山二路74号中山大学广州校区北校园',\n",
       "   'distance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': []},\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': [],\n",
       "   'cityname': '广州市',\n",
       "   'type': '科教文化服务;学校;高等院校',\n",
       "   'photos': [],\n",
       "   'typecode': '141201',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': '309',\n",
       "   'adname': '越秀区',\n",
       "   'name': '中山大学护理学院',\n",
       "   'location': '113.291335,23.129996',\n",
       "   'tel': [],\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFF3UNRS'},\n",
       "  {'parent': [],\n",
       "   'address': '温泉大道882号',\n",
       "   'distance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': '3.5'},\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': [],\n",
       "   'cityname': '广州市',\n",
       "   'type': '科教文化服务;学校;高等院校',\n",
       "   'photos': [{'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/6cb6683be58d514bc02a80c1dbd2ff05'},\n",
       "    {'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/ca4a133bec5f0f26fd4d6d694c25d10f'},\n",
       "    {'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/83c34f0b230b189a03ea87dc42c728c3'}],\n",
       "   'typecode': '141201',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '从化区',\n",
       "   'name': '中山大学南方学院',\n",
       "   'location': '113.679262,23.632583',\n",
       "   'tel': '020-61787331',\n",
       "   'shopid': [],\n",
       "   'id': 'B00140MR9A'},\n",
       "  {'parent': 'B00141IHRZ',\n",
       "   'address': '新港西路135号中山大学(南校区)内',\n",
       "   'distance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': []},\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': [],\n",
       "   'cityname': '广州市',\n",
       "   'type': '科教文化服务;学校;高等院校',\n",
       "   'photos': [],\n",
       "   'typecode': '141201',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': '309',\n",
       "   'adname': '海珠区',\n",
       "   'name': '中山大学-物理学院',\n",
       "   'location': '113.297188,23.097570',\n",
       "   'tel': [],\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFHMWLC6'},\n",
       "  {'parent': 'B00141IHRZ',\n",
       "   'address': '新港西路135号',\n",
       "   'distance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': []},\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': [],\n",
       "   'cityname': '广州市',\n",
       "   'type': '科教文化服务;学校;高等院校',\n",
       "   'photos': [],\n",
       "   'typecode': '141201',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': '309',\n",
       "   'adname': '海珠区',\n",
       "   'name': '中山大学历史学系',\n",
       "   'location': '113.296559,23.096408',\n",
       "   'tel': [],\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFG4G78X'},\n",
       "  {'parent': 'B00141IHRZ',\n",
       "   'address': '新港西路135中山大学',\n",
       "   'distance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': '3.5'},\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': [],\n",
       "   'cityname': '广州市',\n",
       "   'type': '科教文化服务;学校;小学',\n",
       "   'photos': [{'provider': [],\n",
       "     'title': '外景图',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/3eb7a6e93fddcd1ca735527f26e3f31b'},\n",
       "    {'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/b77bed05fb244c83f4ee448fa8c49ebb'},\n",
       "    {'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/25cdee774a47734213ae77841c72f63f'}],\n",
       "   'typecode': '141203',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': '309',\n",
       "   'adname': '海珠区',\n",
       "   'name': '中山大学南校区附属小学',\n",
       "   'location': '113.290511,23.094417',\n",
       "   'tel': '020-84112518',\n",
       "   'shopid': [],\n",
       "   'id': 'B00140TFUF'},\n",
       "  {'parent': 'B0FFJGE87R',\n",
       "   'address': '外环东路132号中山大学东校区生活区',\n",
       "   'distance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': []},\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': [],\n",
       "   'cityname': '广州市',\n",
       "   'type': '科教文化服务;科教文化场所;科教文化场所',\n",
       "   'photos': [{'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/00acfd44b3505044c0d98ba0ba92c371'},\n",
       "    {'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/de0ed7622d9942e5d9f3dd459771bf3f'}],\n",
       "   'typecode': '140000',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': '309',\n",
       "   'adname': '番禺区',\n",
       "   'name': '中山大学医学院实验楼修齐堂',\n",
       "   'location': '113.389634,23.058853',\n",
       "   'tel': [],\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFJN9RJM'},\n",
       "  {'parent': 'B00141IHRZ',\n",
       "   'address': '新港西路135号中山大学东南区266号',\n",
       "   'distance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': []},\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': [],\n",
       "   'cityname': '广州市',\n",
       "   'type': '科教文化服务;学校;高等院校',\n",
       "   'photos': [],\n",
       "   'typecode': '141201',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': '309',\n",
       "   'adname': '海珠区',\n",
       "   'name': '中山大学(南校区)-数学学院',\n",
       "   'location': '113.299434,23.093295',\n",
       "   'tel': [],\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFFDB66H'}],\n",
       " 'status': '1',\n",
       " 'info': 'OK'}"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 调用\n",
    "keywords_search = keywords(crisp_key,\"中山大学\")\n",
    "keywords_search"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 周边搜索\n",
    "1. 在用户传入经纬度坐标点附近，在设定的范围内，按照关键字或POI类型搜索\n",
    "\n",
    " - URL:https://restapi.amap.com/v3/place/around?parameters \n",
    " - 请求参数(必填)：key,location(经纬度)\n",
    " - 请求方式：requests.get()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'suggestion': {'keywords': [], 'cities': []},\n",
       " 'count': '832',\n",
       " 'infocode': '10000',\n",
       " 'pois': [{'parent': [],\n",
       "   'address': '温泉镇笃行路20、22、24号中山大学南方学院',\n",
       "   'distance': '0',\n",
       "   'biz_ext': {'cost': [], 'rating': []},\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': [],\n",
       "   'cityname': '广州市',\n",
       "   'type': '生活服务;共享设备;充电宝',\n",
       "   'photos': [],\n",
       "   'typecode': '072101',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '从化区',\n",
       "   'name': '街电(榴芒一族中山大学南方学院店)',\n",
       "   'location': '113.679287,23.632575',\n",
       "   'tel': [],\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFLB846S'},\n",
       "  {'parent': [],\n",
       "   'address': '从化温泉镇中山大学南方学院博学路6号',\n",
       "   'distance': '0',\n",
       "   'biz_ext': {'cost': [], 'rating': [], 'meal_ordering': '0'},\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;中餐厅;特色/地方风味餐厅',\n",
       "   'photos': [],\n",
       "   'typecode': '050118',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '从化区',\n",
       "   'name': '爽爽石磨肠粉',\n",
       "   'location': '113.679287,23.632575',\n",
       "   'tel': '18218913303',\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFKX3T5Y'},\n",
       "  {'parent': [],\n",
       "   'address': '温泉镇中山大学南方学院明辨路2号二、三层',\n",
       "   'distance': '0',\n",
       "   'biz_ext': {'cost': [], 'rating': [], 'meal_ordering': '0'},\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;餐饮相关场所;餐饮相关',\n",
       "   'photos': [],\n",
       "   'typecode': '050000',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '从化区',\n",
       "   'name': '避风塘',\n",
       "   'location': '113.679286,23.632574',\n",
       "   'tel': [],\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFKT2R96'},\n",
       "  {'parent': [],\n",
       "   'address': '温泉镇中山大学南方学院明辨路2号二、三层',\n",
       "   'distance': '0',\n",
       "   'biz_ext': {'cost': [], 'rating': [], 'meal_ordering': '0'},\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;餐饮相关场所;餐饮相关',\n",
       "   'photos': [],\n",
       "   'typecode': '050000',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '从化区',\n",
       "   'name': 'slim tea',\n",
       "   'location': '113.679286,23.632574',\n",
       "   'tel': '18944690066',\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFKSLFAN'},\n",
       "  {'parent': [],\n",
       "   'address': '温泉镇中山大学南方学院后门润泰超市一楼05号商铺',\n",
       "   'distance': '0',\n",
       "   'biz_ext': {'cost': [], 'rating': [], 'meal_ordering': '0'},\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;中餐厅;特色/地方风味餐厅',\n",
       "   'photos': [],\n",
       "   'typecode': '050118',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '从化区',\n",
       "   'name': '劲酷烤吧',\n",
       "   'location': '113.679286,23.632573',\n",
       "   'tel': '13719231627',\n",
       "   'shopid': [],\n",
       "   'id': 'B0G3AYBO5X'},\n",
       "  {'parent': [],\n",
       "   'address': '温泉镇中山大学南方学院后门润泰超市一楼05号商铺',\n",
       "   'distance': '0',\n",
       "   'biz_ext': {'cost': [], 'rating': [], 'meal_ordering': '0'},\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;中餐厅;广东菜(粤菜)',\n",
       "   'photos': [],\n",
       "   'typecode': '050103',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '从化区',\n",
       "   'name': '东记乡村美食',\n",
       "   'location': '113.679286,23.632573',\n",
       "   'tel': '13922398107',\n",
       "   'shopid': [],\n",
       "   'id': 'B0G3APADKJ'},\n",
       "  {'parent': [],\n",
       "   'address': '温泉镇中山大学南方学院后门润泰超市一楼05号商铺',\n",
       "   'distance': '0',\n",
       "   'biz_ext': {'cost': [], 'rating': [], 'meal_ordering': '0'},\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;快餐厅;快餐厅',\n",
       "   'photos': [],\n",
       "   'typecode': '050300',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '从化区',\n",
       "   'name': '北方饺子馆',\n",
       "   'location': '113.679286,23.632573',\n",
       "   'tel': '13434241448',\n",
       "   'shopid': [],\n",
       "   'id': 'B0G2Z7IX80'},\n",
       "  {'parent': [],\n",
       "   'address': '温泉镇中山大学南方学院后门润泰超市一楼05号商铺',\n",
       "   'distance': '0',\n",
       "   'biz_ext': {'cost': [], 'rating': [], 'meal_ordering': '0'},\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;餐饮相关场所;餐饮相关',\n",
       "   'photos': [],\n",
       "   'typecode': '050000',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '从化区',\n",
       "   'name': '第1烤场',\n",
       "   'location': '113.679286,23.632573',\n",
       "   'tel': '13538825321',\n",
       "   'shopid': [],\n",
       "   'id': 'B0G2K6PX0X'},\n",
       "  {'parent': [],\n",
       "   'address': '温泉镇中山大学南方学院后门润泰超市一楼05号商铺',\n",
       "   'distance': '0',\n",
       "   'biz_ext': {'cost': [], 'rating': [], 'meal_ordering': '0'},\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;餐饮相关场所;餐饮相关',\n",
       "   'photos': [],\n",
       "   'typecode': '050000',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '从化区',\n",
       "   'name': '叶龙老武汉烧烤',\n",
       "   'location': '113.679286,23.632573',\n",
       "   'tel': '15918718710;13125030232',\n",
       "   'shopid': [],\n",
       "   'id': 'B0G1393J7X'},\n",
       "  {'parent': [],\n",
       "   'address': '从化温泉镇中山大学南方学院明辩路2号',\n",
       "   'distance': '0',\n",
       "   'biz_ext': {'cost': [], 'rating': '1.0', 'meal_ordering': '0'},\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;餐饮相关场所;餐饮相关',\n",
       "   'photos': [],\n",
       "   'typecode': '050000',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '从化区',\n",
       "   'name': '网红小串店',\n",
       "   'location': '113.679286,23.632573',\n",
       "   'tel': '13802426981',\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFLNRH1K'},\n",
       "  {'parent': [],\n",
       "   'address': '温泉镇中山大学南方学院后门润泰超市一楼05号商铺',\n",
       "   'distance': '0',\n",
       "   'biz_ext': {'cost': [], 'rating': [], 'meal_ordering': '0'},\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;餐饮相关场所;餐饮相关',\n",
       "   'photos': [],\n",
       "   'typecode': '050000',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '从化区',\n",
       "   'name': '过气轻食屋',\n",
       "   'location': '113.679286,23.632573',\n",
       "   'tel': '13049636920',\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFKTDMOI'},\n",
       "  {'parent': [],\n",
       "   'address': '温泉镇中山大学南方学院后门润泰超市一楼05号商铺',\n",
       "   'distance': '0',\n",
       "   'biz_ext': {'cost': [], 'rating': [], 'meal_ordering': '0'},\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;餐饮相关场所;餐饮相关',\n",
       "   'photos': [],\n",
       "   'typecode': '050000',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '从化区',\n",
       "   'name': '莫凡烧烤',\n",
       "   'location': '113.679286,23.632573',\n",
       "   'tel': '13929768267',\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFKT4WNY'},\n",
       "  {'parent': [],\n",
       "   'address': '温泉大道882号旁润泰超市一楼商铺',\n",
       "   'distance': '0',\n",
       "   'biz_ext': {'cost': [], 'rating': [], 'meal_ordering': '0'},\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;冷饮店;冷饮店',\n",
       "   'photos': [],\n",
       "   'typecode': '050700',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '从化区',\n",
       "   'name': 'LV柠檬茶',\n",
       "   'location': '113.679286,23.632573',\n",
       "   'tel': '15018428578',\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFIIQNQ7'},\n",
       "  {'parent': [],\n",
       "   'address': '温泉镇中山大学南方学院后门润泰超市一楼05号商铺',\n",
       "   'distance': '0',\n",
       "   'biz_ext': {'cost': [], 'rating': [], 'meal_ordering': '0'},\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;甜品店;甜品店',\n",
       "   'photos': [],\n",
       "   'typecode': '050900',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '从化区',\n",
       "   'name': '味美轩(中大店)',\n",
       "   'location': '113.679286,23.632571',\n",
       "   'tel': '15915874513',\n",
       "   'shopid': [],\n",
       "   'id': 'B0G2T96S9V'},\n",
       "  {'parent': [],\n",
       "   'address': '中山大学南方学院',\n",
       "   'distance': '0',\n",
       "   'biz_ext': {'cost': [], 'rating': '4.7', 'meal_ordering': '0'},\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;中餐厅;四川菜(川菜)',\n",
       "   'photos': [{'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/20080ba9f6fcd2808d64ce149b517ca9'},\n",
       "    {'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/9f40694ca108a175d36847d03ecf4ec0'},\n",
       "    {'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/db33127b3da2ffeeabb9bde1157e33cf'}],\n",
       "   'typecode': '050102',\n",
       "   'shopinfo': '1',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '从化区',\n",
       "   'name': '重庆湖边纸包鱼',\n",
       "   'location': '113.679871,23.630292',\n",
       "   'tel': '13924024938',\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFL7NUA2'},\n",
       "  {'parent': [],\n",
       "   'address': '博学路中山大学南方学院后门润泰超市首层23号',\n",
       "   'distance': '1',\n",
       "   'biz_ext': {'cost': [], 'rating': '3.0', 'meal_ordering': '0'},\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;快餐厅;快餐厅',\n",
       "   'photos': [],\n",
       "   'typecode': '050300',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '从化区',\n",
       "   'name': '我家厨房',\n",
       "   'location': '113.679289,23.632563',\n",
       "   'tel': [],\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFK28XPU'},\n",
       "  {'parent': [],\n",
       "   'address': '温泉大道882号',\n",
       "   'distance': '2',\n",
       "   'biz_ext': {'cost': [], 'rating': []},\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': [],\n",
       "   'cityname': '广州市',\n",
       "   'type': '生活服务;共享设备;充电宝',\n",
       "   'photos': [],\n",
       "   'typecode': '072101',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '从化区',\n",
       "   'name': '怪兽充电(中山大学南方学院)',\n",
       "   'location': '113.679262,23.632583',\n",
       "   'tel': [],\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFLLU813'},\n",
       "  {'parent': [],\n",
       "   'address': '温泉镇博学路中山大学南方学院后门润泰超市一楼05号商铺',\n",
       "   'distance': '9',\n",
       "   'biz_ext': {'cost': [], 'rating': [], 'meal_ordering': '0'},\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;外国餐厅;日本料理',\n",
       "   'photos': [],\n",
       "   'typecode': '050202',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '从化区',\n",
       "   'name': '井禾寿司',\n",
       "   'location': '113.679193,23.632552',\n",
       "   'tel': '13789117723',\n",
       "   'shopid': [],\n",
       "   'id': 'B0G14PDQVA'},\n",
       "  {'parent': [],\n",
       "   'address': '中山大学南方学院',\n",
       "   'distance': '12',\n",
       "   'biz_ext': {'cost': [], 'rating': [], 'meal_ordering': '0'},\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;外国餐厅;西餐厅(综合风味)',\n",
       "   'photos': [{'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/b18ad10223dfdcbd28e244ef56a3229e'}],\n",
       "   'typecode': '050201',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '从化区',\n",
       "   'name': 'Uni-hotel西餐',\n",
       "   'location': '113.679224,23.632671',\n",
       "   'tel': [],\n",
       "   'shopid': [],\n",
       "   'id': 'B0GR3OMDZ2'},\n",
       "  {'parent': [],\n",
       "   'address': '从化温泉镇中山大学南方学院明辩路2号',\n",
       "   'distance': '16',\n",
       "   'biz_ext': {'cost': [], 'rating': [], 'meal_ordering': '0'},\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;中餐厅;广东菜(粤菜)',\n",
       "   'photos': [],\n",
       "   'typecode': '050103',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '从化区',\n",
       "   'name': '耀记美食',\n",
       "   'location': '113.679405,23.632673',\n",
       "   'tel': '18816801934',\n",
       "   'shopid': [],\n",
       "   'id': 'B0GRGOTLSL'}],\n",
       " 'status': '1',\n",
       " 'info': 'OK'}"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 调用\n",
    "circum_search = circum(crisp_key,\"113.679287,23.632575\")\n",
    "circum_search"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 多边形搜索\n",
    "1. 在多边形区域内进行搜索\n",
    "\n",
    " - URL:https://restapi.amap.com/v3/place/polygon?parameters \n",
    " - 请求参数(必填)：key,polygon(经纬度,用\"|\"分割)\n",
    " - 请求方式：requests.get()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[{'parent': [],\n",
       "  'address': '东祥路',\n",
       "  'distance': [],\n",
       "  'biz_ext': {'cost': [], 'rating': '3.5'},\n",
       "  'pname': '广东省',\n",
       "  'importance': [],\n",
       "  'biz_type': [],\n",
       "  'cityname': '中山市',\n",
       "  'type': '交通设施服务;火车站;火车站',\n",
       "  'photos': [{'provider': [],\n",
       "    'title': [],\n",
       "    'url': 'http://store.is.autonavi.com/showpic/f165af9ae53d3f5e03c130d4f5de1283'},\n",
       "   {'provider': [],\n",
       "    'title': [],\n",
       "    'url': 'http://store.is.autonavi.com/showpic/06c8c85ee22b508223d5f2fd2d8eb63f'},\n",
       "   {'provider': [],\n",
       "    'title': [],\n",
       "    'url': 'http://store.is.autonavi.com/showpic/3d3480b08240c8c2a04e4d18f525f3f1'}],\n",
       "  'typecode': '150200',\n",
       "  'shopinfo': '2',\n",
       "  'poiweight': [],\n",
       "  'childtype': [],\n",
       "  'adname': '中山市',\n",
       "  'name': '中山站',\n",
       "  'location': '113.432799,22.544233',\n",
       "  'tel': [],\n",
       "  'shopid': [],\n",
       "  'id': 'B02F80OTGM'},\n",
       " {'parent': [],\n",
       "  'address': '(在建)10号线',\n",
       "  'distance': [],\n",
       "  'biz_ext': {'cost': [], 'rating': []},\n",
       "  'pname': '广东省',\n",
       "  'importance': [],\n",
       "  'biz_type': [],\n",
       "  'cityname': '广州市',\n",
       "  'type': '交通设施服务;地铁站;地铁站',\n",
       "  'photos': [],\n",
       "  'typecode': '150500',\n",
       "  'shopinfo': '2',\n",
       "  'poiweight': [],\n",
       "  'childtype': [],\n",
       "  'adname': '海珠区',\n",
       "  'name': '大干围(地铁站)',\n",
       "  'location': '113.279232,23.061166',\n",
       "  'tel': [],\n",
       "  'shopid': [],\n",
       "  'id': 'BV10992380'},\n",
       " {'parent': [],\n",
       "  'address': '7号线',\n",
       "  'distance': [],\n",
       "  'biz_ext': {'cost': [], 'rating': []},\n",
       "  'pname': '广东省',\n",
       "  'importance': [],\n",
       "  'biz_type': [],\n",
       "  'cityname': '广州市',\n",
       "  'type': '交通设施服务;地铁站;地铁站',\n",
       "  'photos': [],\n",
       "  'typecode': '150500',\n",
       "  'shopinfo': '2',\n",
       "  'poiweight': [],\n",
       "  'childtype': [],\n",
       "  'adname': '番禺区',\n",
       "  'name': '谢村(地铁站)',\n",
       "  'location': '113.295832,22.990579',\n",
       "  'tel': [],\n",
       "  'shopid': [],\n",
       "  'id': 'BV10569461'},\n",
       " {'parent': [],\n",
       "  'address': '(在建)10号线;广佛线',\n",
       "  'distance': [],\n",
       "  'biz_ext': {'cost': [], 'rating': []},\n",
       "  'pname': '广东省',\n",
       "  'importance': [],\n",
       "  'biz_type': [],\n",
       "  'cityname': '广州市',\n",
       "  'type': '交通设施服务;地铁站;地铁站',\n",
       "  'photos': [],\n",
       "  'typecode': '150500',\n",
       "  'shopinfo': '2',\n",
       "  'poiweight': [],\n",
       "  'childtype': [],\n",
       "  'adname': '海珠区',\n",
       "  'name': '石溪(地铁站)',\n",
       "  'location': '113.285951,23.067937',\n",
       "  'tel': [],\n",
       "  'shopid': [],\n",
       "  'id': 'BV10544498'},\n",
       " {'parent': [],\n",
       "  'address': '2号线',\n",
       "  'distance': [],\n",
       "  'biz_ext': {'cost': [], 'rating': []},\n",
       "  'pname': '广东省',\n",
       "  'importance': [],\n",
       "  'biz_type': [],\n",
       "  'cityname': '广州市',\n",
       "  'type': '交通设施服务;地铁站;地铁站',\n",
       "  'photos': [],\n",
       "  'typecode': '150500',\n",
       "  'shopinfo': '2',\n",
       "  'poiweight': [],\n",
       "  'childtype': [],\n",
       "  'adname': '海珠区',\n",
       "  'name': '江南西(地铁站)',\n",
       "  'location': '113.273918,23.097214',\n",
       "  'tel': [],\n",
       "  'shopid': [],\n",
       "  'id': 'BV10024418'},\n",
       " {'parent': [],\n",
       "  'address': '2号线',\n",
       "  'distance': [],\n",
       "  'biz_ext': {'cost': [], 'rating': []},\n",
       "  'pname': '广东省',\n",
       "  'importance': [],\n",
       "  'biz_type': [],\n",
       "  'cityname': '广州市',\n",
       "  'type': '交通设施服务;地铁站;地铁站',\n",
       "  'photos': [],\n",
       "  'typecode': '150500',\n",
       "  'shopinfo': '2',\n",
       "  'poiweight': [],\n",
       "  'childtype': [],\n",
       "  'adname': '番禺区',\n",
       "  'name': '南浦(地铁站)',\n",
       "  'location': '113.293154,23.032929',\n",
       "  'tel': [],\n",
       "  'shopid': [],\n",
       "  'id': 'BV10024414'},\n",
       " {'parent': [],\n",
       "  'address': '2号线;8号线',\n",
       "  'distance': [],\n",
       "  'biz_ext': {'cost': [], 'rating': []},\n",
       "  'pname': '广东省',\n",
       "  'importance': [],\n",
       "  'biz_type': [],\n",
       "  'cityname': '广州市',\n",
       "  'type': '交通设施服务;地铁站;地铁站',\n",
       "  'photos': [],\n",
       "  'typecode': '150500',\n",
       "  'shopinfo': '2',\n",
       "  'poiweight': [],\n",
       "  'childtype': [],\n",
       "  'adname': '海珠区',\n",
       "  'name': '昌岗(地铁站)',\n",
       "  'location': '113.276885,23.090654',\n",
       "  'tel': [],\n",
       "  'shopid': [],\n",
       "  'id': 'BV10024399'},\n",
       " {'parent': [],\n",
       "  'address': '(在建)11号线内环;(在建)11号线外环;2号线',\n",
       "  'distance': [],\n",
       "  'biz_ext': {'cost': [], 'rating': []},\n",
       "  'pname': '广东省',\n",
       "  'importance': [],\n",
       "  'biz_type': [],\n",
       "  'cityname': '广州市',\n",
       "  'type': '交通设施服务;地铁站;地铁站',\n",
       "  'photos': [],\n",
       "  'typecode': '150500',\n",
       "  'shopinfo': '2',\n",
       "  'poiweight': [],\n",
       "  'childtype': [],\n",
       "  'adname': '海珠区',\n",
       "  'name': '江泰路(地铁站)',\n",
       "  'location': '113.280570,23.082231',\n",
       "  'tel': [],\n",
       "  'shopid': [],\n",
       "  'id': 'BV10019562'},\n",
       " {'parent': [],\n",
       "  'address': '2号线',\n",
       "  'distance': [],\n",
       "  'biz_ext': {'cost': [], 'rating': []},\n",
       "  'pname': '广东省',\n",
       "  'importance': [],\n",
       "  'biz_type': [],\n",
       "  'cityname': '广州市',\n",
       "  'type': '交通设施服务;地铁站;地铁站',\n",
       "  'photos': [],\n",
       "  'typecode': '150500',\n",
       "  'shopinfo': '2',\n",
       "  'poiweight': [],\n",
       "  'childtype': [],\n",
       "  'adname': '海珠区',\n",
       "  'name': '市二宫(地铁站)',\n",
       "  'location': '113.269890,23.105996',\n",
       "  'tel': [],\n",
       "  'shopid': [],\n",
       "  'id': 'BV10019502'},\n",
       " {'parent': [],\n",
       "  'address': '(在建)3号线',\n",
       "  'distance': [],\n",
       "  'biz_ext': {'cost': [], 'rating': []},\n",
       "  'pname': '广东省',\n",
       "  'importance': [],\n",
       "  'biz_type': [],\n",
       "  'cityname': '佛山市',\n",
       "  'type': '交通设施服务;地铁站;地铁站',\n",
       "  'photos': [],\n",
       "  'typecode': '150500',\n",
       "  'shopinfo': '2',\n",
       "  'poiweight': [],\n",
       "  'childtype': [],\n",
       "  'adname': '顺德区',\n",
       "  'name': '顺德客运港(地铁站)',\n",
       "  'location': '113.340692,22.808777',\n",
       "  'tel': [],\n",
       "  'shopid': [],\n",
       "  'id': 'BV11396734'},\n",
       " {'parent': [],\n",
       "  'address': '民科东路11号',\n",
       "  'distance': [],\n",
       "  'biz_ext': {'cost': [], 'rating': []},\n",
       "  'pname': '广东省',\n",
       "  'importance': [],\n",
       "  'biz_type': [],\n",
       "  'cityname': '中山市',\n",
       "  'type': '商务住宅;楼宇;商务写字楼',\n",
       "  'photos': [{'provider': [],\n",
       "    'title': [],\n",
       "    'url': 'http://store.is.autonavi.com/showpic/f2c4aaa9963f8a509e3fd07151a7e813'}],\n",
       "  'typecode': '120201',\n",
       "  'shopinfo': '0',\n",
       "  'poiweight': [],\n",
       "  'childtype': [],\n",
       "  'adname': '中山市',\n",
       "  'name': '日升广场',\n",
       "  'location': '113.394497,22.557716',\n",
       "  'tel': '0760-28181313',\n",
       "  'shopid': [],\n",
       "  'id': 'B0FFG0JCVB'},\n",
       " {'parent': [],\n",
       "  'address': '南浦大道',\n",
       "  'distance': [],\n",
       "  'biz_ext': {'cost': '28736.00', 'rating': []},\n",
       "  'pname': '广东省',\n",
       "  'importance': [],\n",
       "  'biz_type': [],\n",
       "  'cityname': '广州市',\n",
       "  'type': '商务住宅;住宅区;住宅小区',\n",
       "  'photos': [{'provider': [],\n",
       "    'title': '外景图',\n",
       "    'url': 'http://store.is.autonavi.com/showpic/b0b97500c2aacfcd2857dcbee620ca34'},\n",
       "   {'provider': [],\n",
       "    'title': '外景图',\n",
       "    'url': 'http://store.is.autonavi.com/showpic/768e48bfe67f580aa710ece67ac8ef96'},\n",
       "   {'provider': [],\n",
       "    'title': '外景图',\n",
       "    'url': 'http://store.is.autonavi.com/showpic/aceac88405358b4df9804ed16f0cd81e'}],\n",
       "  'typecode': '120302',\n",
       "  'shopinfo': '0',\n",
       "  'poiweight': [],\n",
       "  'childtype': [],\n",
       "  'adname': '番禺区',\n",
       "  'name': '碧桂园',\n",
       "  'location': '113.289282,23.028273',\n",
       "  'tel': '020-84598886',\n",
       "  'shopid': [],\n",
       "  'id': 'B00140AX5T'},\n",
       " {'parent': [],\n",
       "  'address': '南外环8号',\n",
       "  'distance': [],\n",
       "  'biz_ext': {'cost': '21292.00', 'rating': []},\n",
       "  'pname': '广东省',\n",
       "  'importance': [],\n",
       "  'biz_type': [],\n",
       "  'cityname': '中山市',\n",
       "  'type': '商务住宅;住宅区;住宅小区',\n",
       "  'photos': [],\n",
       "  'typecode': '120302',\n",
       "  'shopinfo': '0',\n",
       "  'poiweight': [],\n",
       "  'childtype': [],\n",
       "  'adname': '中山市',\n",
       "  'name': '凯茵新城',\n",
       "  'location': '113.465680,22.506553',\n",
       "  'tel': '0760-88880316;0760-88881180',\n",
       "  'shopid': [],\n",
       "  'id': 'B02F802N9J'},\n",
       " {'parent': [],\n",
       "  'address': '世纪东路5号',\n",
       "  'distance': [],\n",
       "  'biz_ext': {'cost': '10632.00', 'rating': []},\n",
       "  'pname': '广东省',\n",
       "  'importance': [],\n",
       "  'biz_type': [],\n",
       "  'cityname': '中山市',\n",
       "  'type': '商务住宅;住宅区;住宅小区',\n",
       "  'photos': [{'provider': [],\n",
       "    'title': '外景图',\n",
       "    'url': 'http://store.is.autonavi.com/showpic/7d5a2a608f1420686c6d11218d7369c2'},\n",
       "   {'provider': [],\n",
       "    'title': '外景图',\n",
       "    'url': 'http://store.is.autonavi.com/showpic/35cffed8e92506156152c6e1863b6fbf'},\n",
       "   {'provider': [],\n",
       "    'title': '外景图',\n",
       "    'url': 'http://store.is.autonavi.com/showpic/ad6a0a9d3dcba0284fb5b82c7b136ba5'}],\n",
       "  'typecode': '120302',\n",
       "  'shopinfo': '0',\n",
       "  'poiweight': [],\n",
       "  'childtype': [],\n",
       "  'adname': '中山市',\n",
       "  'name': '保利·国际广场',\n",
       "  'location': '113.398578,22.582857',\n",
       "  'tel': '0760-88518888',\n",
       "  'shopid': [],\n",
       "  'id': 'B02F80P7PM'},\n",
       " {'parent': [],\n",
       "  'address': '江南大道中232号华海大厦A座',\n",
       "  'distance': [],\n",
       "  'biz_ext': {'cost': '14972.00', 'rating': []},\n",
       "  'pname': '广东省',\n",
       "  'importance': [],\n",
       "  'biz_type': [],\n",
       "  'cityname': '广州市',\n",
       "  'type': '商务住宅;楼宇;商务写字楼',\n",
       "  'photos': [{'provider': [],\n",
       "    'title': '客房',\n",
       "    'url': 'http://store.is.autonavi.com/showpic/a4551ad98d5e94cffdac92495cc08363'},\n",
       "   {'provider': [],\n",
       "    'title': '客房',\n",
       "    'url': 'http://store.is.autonavi.com/showpic/2383c754f492b61dcb64421c25b18e01'},\n",
       "   {'provider': [],\n",
       "    'title': '会议室',\n",
       "    'url': 'http://store.is.autonavi.com/showpic/d969268690c4439d946a4ca1478d6dd2'}],\n",
       "  'typecode': '120201',\n",
       "  'shopinfo': '0',\n",
       "  'poiweight': [],\n",
       "  'childtype': [],\n",
       "  'adname': '海珠区',\n",
       "  'name': '海军华海大厦',\n",
       "  'location': '113.274897,23.093955',\n",
       "  'tel': [],\n",
       "  'shopid': [],\n",
       "  'id': 'B00140UOQL'},\n",
       " {'parent': [],\n",
       "  'address': '江燕路20号(江燕路与江南大道南交界处)',\n",
       "  'distance': [],\n",
       "  'biz_ext': {'cost': '46516.00', 'rating': []},\n",
       "  'pname': '广东省',\n",
       "  'importance': [],\n",
       "  'biz_type': [],\n",
       "  'cityname': '广州市',\n",
       "  'type': '商务住宅;住宅区;住宅小区',\n",
       "  'photos': [{'provider': [],\n",
       "    'title': [],\n",
       "    'url': 'http://store.is.autonavi.com/showpic/26d4241e02aacb7d572603c366aa6834'},\n",
       "   {'provider': [],\n",
       "    'title': [],\n",
       "    'url': 'http://store.is.autonavi.com/showpic/99d22bce85774a3ef72df34252552d26'},\n",
       "   {'provider': [],\n",
       "    'title': '外景图',\n",
       "    'url': 'http://store.is.autonavi.com/showpic/eef2bbcb00f9e2891e749369310db4bd'}],\n",
       "  'typecode': '120302',\n",
       "  'shopinfo': '0',\n",
       "  'poiweight': [],\n",
       "  'childtype': [],\n",
       "  'adname': '海珠区',\n",
       "  'name': '海富花园',\n",
       "  'location': '113.277736,23.083776',\n",
       "  'tel': '020-34221579;020-89099385',\n",
       "  'shopid': [],\n",
       "  'id': 'B00140C6UQ'},\n",
       " {'parent': [],\n",
       "  'address': '洛浦街新浦南路',\n",
       "  'distance': [],\n",
       "  'biz_ext': {'cost': '29876.00', 'rating': []},\n",
       "  'pname': '广东省',\n",
       "  'importance': [],\n",
       "  'biz_type': [],\n",
       "  'cityname': '广州市',\n",
       "  'type': '商务住宅;住宅区;住宅小区',\n",
       "  'photos': [{'provider': [],\n",
       "    'title': '外景图',\n",
       "    'url': 'http://store.is.autonavi.com/showpic/e10dc29f3ff2cd5fc370682ec29ea019'},\n",
       "   {'provider': [],\n",
       "    'title': '外景图',\n",
       "    'url': 'http://store.is.autonavi.com/showpic/b3994390d4ab6a654f4c1609c9fb25aa'},\n",
       "   {'provider': [],\n",
       "    'title': '外景图',\n",
       "    'url': 'http://store.is.autonavi.com/showpic/f68a966168578cfc8ed718fea06eb225'}],\n",
       "  'typecode': '120302',\n",
       "  'shopinfo': '0',\n",
       "  'poiweight': [],\n",
       "  'childtype': [],\n",
       "  'adname': '番禺区',\n",
       "  'name': '海龙湾',\n",
       "  'location': '113.30026,23.027021',\n",
       "  'tel': '020-84592000;020-84591666',\n",
       "  'shopid': [],\n",
       "  'id': 'B00140UFUG'},\n",
       " {'parent': [],\n",
       "  'address': '博爱六路28号',\n",
       "  'distance': [],\n",
       "  'biz_ext': {'cost': [], 'rating': []},\n",
       "  'pname': '广东省',\n",
       "  'importance': [],\n",
       "  'biz_type': [],\n",
       "  'cityname': '中山市',\n",
       "  'type': '商务住宅;楼宇;商住两用楼宇|商务住宅;楼宇;商务写字楼',\n",
       "  'photos': [{'provider': [],\n",
       "    'title': [],\n",
       "    'url': 'http://store.is.autonavi.com/showpic/ddad309757af5096d053b99a7877aa59'},\n",
       "   {'provider': [],\n",
       "    'title': [],\n",
       "    'url': 'http://store.is.autonavi.com/showpic/58d69a026b8b48fce4e695e4e80a9dfe'},\n",
       "   {'provider': [],\n",
       "    'title': [],\n",
       "    'url': 'http://store.is.autonavi.com/showpic/71a87702bc0bb36ea7e1a9116ac2e15a'}],\n",
       "  'typecode': '120203|120201',\n",
       "  'shopinfo': '0',\n",
       "  'poiweight': [],\n",
       "  'childtype': [],\n",
       "  'adname': '中山市',\n",
       "  'name': '远洋广场',\n",
       "  'location': '113.418857,22.502319',\n",
       "  'tel': [],\n",
       "  'shopid': [],\n",
       "  'id': 'B0FFF35KGO'},\n",
       " {'parent': [],\n",
       "  'address': '大良街道大良德胜东路',\n",
       "  'distance': [],\n",
       "  'biz_ext': {'cost': [], 'rating': '3.5'},\n",
       "  'pname': '广东省',\n",
       "  'importance': [],\n",
       "  'biz_type': [],\n",
       "  'cityname': '佛山市',\n",
       "  'type': '交通设施服务;港口码头;港口码头',\n",
       "  'photos': [{'provider': [],\n",
       "    'title': [],\n",
       "    'url': 'http://store.is.autonavi.com/showpic/90eaec66bda4c96e66c700980b557719'},\n",
       "   {'provider': [],\n",
       "    'title': [],\n",
       "    'url': 'http://store.is.autonavi.com/showpic/1a08776fe4c43a6a0cc11de4a1ee82b1'},\n",
       "   {'provider': [],\n",
       "    'title': [],\n",
       "    'url': 'http://store.is.autonavi.com/showpic/01582d21a3144c150e6a0646efe04bfc'}],\n",
       "  'typecode': '150300',\n",
       "  'shopinfo': '0',\n",
       "  'poiweight': [],\n",
       "  'childtype': [],\n",
       "  'adname': '顺德区',\n",
       "  'name': '顺德港(南国东路)',\n",
       "  'location': '113.340879,22.804984',\n",
       "  'tel': [],\n",
       "  'shopid': [],\n",
       "  'id': 'B02F501U7Y'},\n",
       " {'parent': 'B0FFFT958V',\n",
       "  'address': '富丽路2号',\n",
       "  'distance': [],\n",
       "  'biz_ext': {'cost': '11795.00', 'rating': []},\n",
       "  'pname': '广东省',\n",
       "  'importance': [],\n",
       "  'biz_type': [],\n",
       "  'cityname': '中山市',\n",
       "  'type': '商务住宅;住宅区;住宅小区',\n",
       "  'photos': [{'provider': [],\n",
       "    'title': [],\n",
       "    'url': 'http://store.is.autonavi.com/showpic/a2f057e709ff7f29e62c0a8bacc932d5'},\n",
       "   {'provider': [],\n",
       "    'title': '外景图',\n",
       "    'url': 'http://store.is.autonavi.com/showpic/8c155eeb2cce7616605defd491adc6fb'},\n",
       "   {'provider': [],\n",
       "    'title': '外景图',\n",
       "    'url': 'http://store.is.autonavi.com/showpic/d347c18d5b31427c08b8d2614a722187'}],\n",
       "  'typecode': '120302',\n",
       "  'shopinfo': '0',\n",
       "  'poiweight': [],\n",
       "  'childtype': '308',\n",
       "  'adname': '中山市',\n",
       "  'name': '永怡花园南区',\n",
       "  'location': '113.398258,22.528432',\n",
       "  'tel': [],\n",
       "  'shopid': [],\n",
       "  'id': 'B02F802N2R'}]"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 调用：广州，中山，珠海\n",
    "polygon_search = polygon(crisp_key,\"113.264434,23.129162|113.392782,22.517645|113.576726,22.270715\")\n",
    "polygon_search"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### ID查询\n",
    "1. 通过POI ID，查询某个POI详情，建议可同输入提示API配合使用\n",
    "\n",
    " - URL:https://restapi.amap.com/v3/place/detail?parameters \n",
    " - 请求参数(必填)：key,id(兴趣点的唯一标识的ID)\n",
    " - 请求方式：requests.get()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'count': '1',\n",
       " 'infocode': '10000',\n",
       " 'pois': [{'parent': [],\n",
       "   'distance': [],\n",
       "   'pcode': '110000',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': []},\n",
       "   'recommend': '0',\n",
       "   'type': '商务住宅;楼宇;商务写字楼',\n",
       "   'photos': [{'title': '效果图',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/a9836f620749c34742cf1ab67dc98f08'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/53b11166a310a21470acde3a'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/53b11166a310a21470acde31'}],\n",
       "   'discount_num': '0',\n",
       "   'gridcode': '5916739702',\n",
       "   'typecode': '120201',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'deep_info': {'deepsrc': []},\n",
       "   'citycode': '010',\n",
       "   'adname': '朝阳区',\n",
       "   'indoor_src': '高德地图',\n",
       "   'children': [],\n",
       "   'tel': [],\n",
       "   'id': 'B0FFFAB6J2',\n",
       "   'tag': [],\n",
       "   'event': [],\n",
       "   'entr_location': '116.473993,39.992784',\n",
       "   'indoor_map': '1',\n",
       "   'email': [],\n",
       "   'timestamp': '2020-11-17 14:09:17',\n",
       "   'website': [],\n",
       "   'address': '阜荣街10号',\n",
       "   'adcode': '110105',\n",
       "   'pname': '北京市',\n",
       "   'biz_type': [],\n",
       "   'cityname': '北京市',\n",
       "   'postcode': [],\n",
       "   'match': '0',\n",
       "   'business_area': '望京',\n",
       "   'indoor_data': {'cmsid': 'TY000191_B0FFFAB6J2',\n",
       "    'truefloor': [],\n",
       "    'cpid': 'B0FFFAB6J2',\n",
       "    'floor': []},\n",
       "   'childtype': [],\n",
       "   'rich_content': [],\n",
       "   'exit_location': [],\n",
       "   'name': '首开广场',\n",
       "   'location': '116.473004,39.993306',\n",
       "   'shopid': [],\n",
       "   'navi_poiid': 'J50F001020_342662',\n",
       "   'groupbuy_num': '0'}],\n",
       " 'status': '1',\n",
       " 'info': 'OK'}"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 调用\n",
    "id_search = ID(crisp_key,\"B0FFFAB6J2\")\n",
    "id_search"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# IP定位\n",
    "* IP定位是一个简单的HTTP接口，根据用户输入的IP地址，能够快速的帮用户定位IP的所在位置。\n",
    "\n",
    "* URL：https://restapi.amap.com/v3/ip?parameters\n",
    "* 请求参数(必填)：key\n",
    "* 请求方式：requests.get()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000',\n",
       " 'province': '广东省',\n",
       " 'city': '广州市',\n",
       " 'adcode': '440100',\n",
       " 'rectangle': '113.1017375,22.93212254;113.6770499,23.3809537'}"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 调用\n",
    "IP_search = IP(crisp_key)\n",
    "IP_search"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 静态地图\n",
    "1. 静态地图服务通过返回一张地图图片响应HTTP请求，使用户能够将高德地图以图片形式嵌入自己的网页中。用户可以指定请求的地图位置、图片大小、以及在地图上添加覆盖物，如标签、标注、折线、多边形。\n",
    "\n",
    " -  URL：https://restapi.amap.com/v3/staticmap?parameters\n",
    " -  请求参数：key,location(经纬度，部分条件必填),zoom(地图缩放级 别),size(选填)\n",
    " - 请求方式：requests.get()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'https://restapi.amap.com/v3/staticmap?parameters&key=d3db9101f93fc24ecd64266e51e08f39&location=113.384129%2C22.937244&zoom=15&size=1000%2A800'"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 调用,广州市番禺区\n",
    "static_map = static(crisp_key,\"113.384129,22.937244\",15,\"1000*800\")\n",
    "static_map"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 坐标转换\n",
    "\n",
    "1. 坐标转换是一类简单的HTTP接口，能够将用户输入的非高德坐标（GPS坐标、mapbar坐标、baidu坐标）转换成高德坐标。\n",
    "2. 适用场景：为了使用高德服务，用户需要将非高德坐标转换为高德坐标。\n",
    "\n",
    "  - URL：https://restapi.amap.com/v3/assistant/coordinate/convert?parameters\n",
    "\n",
    "  - 请求参数：key,locations(经纬度，部分条件必填)\n",
    "\n",
    "  - 请求方式：requests.get()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'113.384129,22.937244'"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 调用,广州市番禺区\n",
    "coordinates = coordinates(crisp_key,\"113.384129,22.937244\")\n",
    "coordinates"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 天气查询\n",
    "1. 天气查询是一个简单的HTTP接口，根据用户输入的adcode，查询目标区域当前/未来的天气情况。\n",
    "2. 适用场景：需要使用相关天气查询的时候。\n",
    "\n",
    "  - URL：https://restapi.amap.com/v3/weather/weatherInfo?parameters\n",
    "  - 请求参数：key,city(输入城市的adcode)\n",
    "  - 请求方式：requests.get()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'count': '1',\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000',\n",
       " 'forecasts': [{'city': '广州市',\n",
       "   'adcode': '440100',\n",
       "   'province': '广东',\n",
       "   'reporttime': '2020-11-17 21:52:46',\n",
       "   'casts': [{'date': '2020-11-17',\n",
       "     'week': '2',\n",
       "     'dayweather': '多云',\n",
       "     'nightweather': '多云',\n",
       "     'daytemp': '29',\n",
       "     'nighttemp': '22',\n",
       "     'daywind': '东南',\n",
       "     'nightwind': '东南',\n",
       "     'daypower': '≤3',\n",
       "     'nightpower': '≤3'},\n",
       "    {'date': '2020-11-18',\n",
       "     'week': '3',\n",
       "     'dayweather': '多云',\n",
       "     'nightweather': '多云',\n",
       "     'daytemp': '27',\n",
       "     'nighttemp': '22',\n",
       "     'daywind': '东南',\n",
       "     'nightwind': '东南',\n",
       "     'daypower': '4',\n",
       "     'nightpower': '4'},\n",
       "    {'date': '2020-11-19',\n",
       "     'week': '4',\n",
       "     'dayweather': '多云',\n",
       "     'nightweather': '多云',\n",
       "     'daytemp': '27',\n",
       "     'nighttemp': '22',\n",
       "     'daywind': '北',\n",
       "     'nightwind': '北',\n",
       "     'daypower': '≤3',\n",
       "     'nightpower': '≤3'},\n",
       "    {'date': '2020-11-20',\n",
       "     'week': '5',\n",
       "     'dayweather': '多云',\n",
       "     'nightweather': '多云',\n",
       "     'daytemp': '28',\n",
       "     'nighttemp': '21',\n",
       "     'daywind': '北',\n",
       "     'nightwind': '北',\n",
       "     'daypower': '≤3',\n",
       "     'nightpower': '≤3'}]}]}"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 调用,查询广州天气\n",
    "weather = weather(crisp_key,\"440100\")\n",
    "weather"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 输入提示\n",
    "1. 输入提示是一类简单的HTTP接口，提供根据用户输入的关键词查询返回建议列表。\n",
    "2. 适用场景：在高德客户端的使用场景，输入关键词之后出现提示相关。\n",
    "\n",
    "  - URL：https://restapi.amap.com/v3/assistant/inputtips?parameters\n",
    "  - 请求参数：key,keywords\n",
    "  - 请求方式：requests.get()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'count': '10',\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000',\n",
       " 'tips': [{'id': 'B03DF0S5GM',\n",
       "   'name': '肯德基(中山路店)',\n",
       "   'district': '新疆维吾尔自治区乌鲁木齐市天山区',\n",
       "   'adcode': '650102',\n",
       "   'location': '87.616293,43.794344',\n",
       "   'address': '中山路297号',\n",
       "   'typecode': '050301',\n",
       "   'city': []},\n",
       "  {'id': 'B02B30LZZS',\n",
       "   'name': '肯德基(西双十二城店)',\n",
       "   'district': '云南省西双版纳傣族自治州景洪市',\n",
       "   'adcode': '532801',\n",
       "   'location': '100.805775,22.004311',\n",
       "   'address': '勐海路2号西双十二城大润发1层',\n",
       "   'typecode': '050301',\n",
       "   'city': []},\n",
       "  {'id': 'B03A305576',\n",
       "   'name': '肯德基(新亚欧店)',\n",
       "   'district': '甘肃省兰州市城关区',\n",
       "   'adcode': '620102',\n",
       "   'location': '103.818860,36.059668',\n",
       "   'address': '中山路120号亚欧商厦1层',\n",
       "   'typecode': '050301',\n",
       "   'city': []},\n",
       "  {'id': 'B03A30AZK8',\n",
       "   'name': '肯德基(火车站店)',\n",
       "   'district': '甘肃省兰州市城关区',\n",
       "   'adcode': '620102',\n",
       "   'location': '103.852084,36.034781',\n",
       "   'address': '兰州火车站',\n",
       "   'typecode': '050301',\n",
       "   'city': []},\n",
       "  {'id': 'B036705IXH',\n",
       "   'name': '肯德基(青年路店)',\n",
       "   'district': '云南省昆明市五华区',\n",
       "   'adcode': '530102',\n",
       "   'location': '102.715481,25.041656',\n",
       "   'address': '人民中路17号百盛购物广场1层',\n",
       "   'typecode': '050301',\n",
       "   'city': []},\n",
       "  {'id': 'B036705OGR',\n",
       "   'name': '肯德基(山姆店)',\n",
       "   'district': '云南省昆明市官渡区',\n",
       "   'adcode': '530111',\n",
       "   'location': '102.730680,25.013201',\n",
       "   'address': '春城路289号沃尔玛购物广场1层',\n",
       "   'typecode': '050301',\n",
       "   'city': []},\n",
       "  {'id': 'B001C7ZY8Y',\n",
       "   'name': '肯德基(温江DT店)',\n",
       "   'district': '四川省成都市温江区',\n",
       "   'adcode': '510115',\n",
       "   'location': '103.855564,30.688456',\n",
       "   'address': '光华大道三段1888号',\n",
       "   'typecode': '050301',\n",
       "   'city': []},\n",
       "  {'id': 'B0FFFABSC6',\n",
       "   'name': '肯德基(杭州路店)',\n",
       "   'district': '四川省眉山市东坡区',\n",
       "   'adcode': '511402',\n",
       "   'location': '103.831395,30.054106',\n",
       "   'address': '三苏大道168号',\n",
       "   'typecode': '050301',\n",
       "   'city': []},\n",
       "  {'id': 'B0FFFACQIG',\n",
       "   'name': '肯德基(环湖店)',\n",
       "   'district': '四川省眉山市东坡区',\n",
       "   'adcode': '511402',\n",
       "   'location': '103.845948,30.045129',\n",
       "   'address': '环湖东段100号大润发1楼',\n",
       "   'typecode': '050301',\n",
       "   'city': []},\n",
       "  {'id': 'B001C80FFL',\n",
       "   'name': '肯德基(簇桥店)',\n",
       "   'district': '四川省成都市武侯区',\n",
       "   'adcode': '510107',\n",
       "   'location': '103.990533,30.607304',\n",
       "   'address': '簇桥簇锦北路138号千盛生活广场1楼',\n",
       "   'typecode': '050301',\n",
       "   'city': []}]}"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 调用\n",
    "input_prompt = input(crisp_key,\"肯德基\")\n",
    "input_prompt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
